You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding specific file extension to Parse Server config under fileUpload.fileExtensions option doesn't work. When I upload quicktime file I get error with the code 130 and message "File upload of extension quicktime is disabled.".
🚀 You can help us to fix this issue faster by opening a pull request with a failing test. See our Contribution Guide for how to make a pull request, or read our New Contributor's Guide if this is your first time contributing.
New Issue Checklist
Issue Description
Adding specific file extension to Parse Server config under fileUpload.fileExtensions option doesn't work. When I upload quicktime file I get error with the code 130 and message "File upload of extension quicktime is disabled.".
I checked the code and I think there is a bug here: https://github.com/parse-community/parse-server/blob/c9b59719ec9648f9ba8bbef89db2a24a227ae55c/src/Routers/FilesRouter.js#L150C24-L150C24
Instead of
const regex = new RegExp(fileExtensions);
there should be
const regex = new RegExp(ext);
as fileExtensions is an array of patterns and every pattern should be tested separately.
Steps to reproduce
Set file upload config (standard extensions + quicktime extension):
{ fileUpload: { fileExtensions: ["^[^hH][^tT][^mM][^lL]?$", "^quicktime$"], }}
Actual Outcome
Parse Server doesn't allow me to upload quicktime file.
Expected Outcome
I should be able to add any extension.
Environment
Server
Database
Client
The text was updated successfully, but these errors were encountered: