Shared MimeType config for Uploadthing

Hi, I would like to define allowed MimeType - .jpeg, .png, .pdf and also I would like to define min and max file count, but shared across the mime types. e.g. I have minimum 5 files and maximum 10, so I would like to be able to select 3x .pngs, 2x .jpegs and 1x .pdf I currently defined the router config like this
"image/jpeg": { maxFileSize: "8MB", minFileCount: 5, maxFileCount: 10 },
"image/png": { maxFileSize: "8MB", minFileCount: 5, maxFileCount: 10 },
"application/pdf": {
maxFileSize: "8MB",
minFileCount: 5,
maxFileCount: 10,
}
"image/jpeg": { maxFileSize: "8MB", minFileCount: 5, maxFileCount: 10 },
"image/png": { maxFileSize: "8MB", minFileCount: 5, maxFileCount: 10 },
"application/pdf": {
maxFileSize: "8MB",
minFileCount: 5,
maxFileCount: 10,
}
But it looks like it takes the validation for each Mime type
2 Replies
farmisen
farmisen3w ago
Having the same question, did you figure something out? @Zoidy
Zoidy
ZoidyOP3w ago
No
Want results from more Discord servers?
Add your server