MCPcopy Index your code
hub / github.com/pingdotgg/uploadthing / generatePermittedFileTypes

Function generatePermittedFileTypes

packages/shared/src/component-utils.ts:73–81  ·  view source on GitHub ↗
(config?: ExpandedRouteConfig)

Source from the content-addressed store, hash-verified

71 */
72
73export const generatePermittedFileTypes = (config?: ExpandedRouteConfig) => {
74 const fileTypes = config ? objectKeys(config) : [];
75
76 const maxFileCount = config
77 ? Object.values(config).map((v) => v.maxFileCount)
78 : [];
79
80 return { fileTypes, multiple: maxFileCount.some((v) => v && v > 1) };
81};
82
83export const capitalizeStart = (str: string) => {
84 return str.charAt(0).toUpperCase() + str.slice(1);

Callers 10

UploadDropzoneFunction · 0.90
UploadButtonFunction · 0.90
generateFileTypesFunction · 0.90
generateMediaTypesFunction · 0.90
fileInfoFunction · 0.90
fileInfoFunction · 0.90
generateUploadDropzoneFunction · 0.90
generateUploadButtonFunction · 0.90
setInputPropsFunction · 0.85
useUploadThingDropzoneFunction · 0.85

Calls 1

objectKeysFunction · 0.90

Tested by

no test coverage detected