MimeGroupedFiletypeOptions
MimeGroupedFiletypeOptions<
TInput> =object
Defined in: packages/storage/src/types.ts:77
Options for the per-mime form of filetype — all the fields you’d
set on a FiletypeConfig except accept and maxSize, which are
derived from the MIME groups.
Type Parameters
Section titled “Type Parameters”TInput
Section titled “TInput”TInput = Record<string, unknown>
Properties
Section titled “Properties”bucket
Section titled “bucket”bucket:
string
Defined in: packages/storage/src/types.ts:79
R2 binding name from the Workers environment (e.g. "UPLOADS").
hooks?
Section titled “hooks?”
optionalhooks:FiletypeHooks<TInput>
Defined in: packages/storage/src/types.ts:93
Lifecycle hooks that run before and after upload.
key: (
file,ctx) =>string
Defined in: packages/storage/src/types.ts:81
Function that generates the R2 object key for an uploaded file.
Parameters
Section titled “Parameters”extension
Section titled “extension”string
string
KeyContext<TInput>
Returns
Section titled “Returns”string
multipartThreshold?
Section titled “multipartThreshold?”
optionalmultipartThreshold:string
Defined in: packages/storage/src/types.ts:87
File size above which multipart upload is used (default "5mb").
ownerCheck?
Section titled “ownerCheck?”
optionalownerCheck:OwnerCheck
Defined in: packages/storage/src/types.ts:95
Access-control gate used by the /uploads/* proxy route.
partSize?
Section titled “partSize?”
optionalpartSize:string
Defined in: packages/storage/src/types.ts:89
Size of each part in a multipart upload (default "10mb").
publicUrl?
Section titled “publicUrl?”
optionalpublicUrl:string
Defined in: packages/storage/src/types.ts:91
Base URL for publicly accessible files (used by getPublicUrl).
replace?
Section titled “replace?”
optionalreplace:boolean
Defined in: packages/storage/src/types.ts:83
When true, uploading replaces all existing files under the same key prefix.
uploadable?
Section titled “uploadable?”
optionaluploadable:boolean
Defined in: packages/storage/src/types.ts:85
When false, the file type cannot be uploaded directly (e.g. system-generated exports).