#Upload mimeTypes not working Payload 3.0 beta 106

9 messages · Page 1 of 1 (latest)

serene pebble
#

upload: {
mimeTypes: ["image/png", "image/jpeg", "image/svg+xml"],
disableLocalStorage: true,
bulkUpload: false,
},

i have this in my collection config. when i upload file it validate the file type. but file picker does not have filters based on mimeTypes.

lucid heraldBOT
serene pebble
#

Upload mimeTypes not working Payload 3.0 beta 106

bright locust
#

Can you test with just 1 or 2 of them, specifically removing the svg one

serene pebble
#

tried with 1 and 2 but same issue.

#

err: {
"type": "TypeError",
"message": "Cannot read properties of undefined (reading 'length')",
"stack":
TypeError: Cannot read properties of undefined (reading 'length')
at buildFormState (webpack-internal:///(rsc)/./node_modules/@payloadcms/ui/dist/utilities/buildFormState.js:69:26)
at Object.buildFormState [as form-state] (webpack-internal:///(rsc)/./node_modules/@payloadcms/next/dist/routes/rest/buildFormState.js:21:113)
at eval (webpack-internal:///(rsc)/./node_modules/@payloadcms/next/dist/routes/rest/index.js:589:45)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)

#

i'm getting this error when modal open.

bright locust
#

@fickle gull or @woven wadi can you look into this when you have time

gray moss
#

@bright locust @fickle gull One more thing can we use mimeTypes filter in upload field when uploading new file currently only applying in existing media collection