refactor: Add new Parse Server option fileUpload.fileExtensions to restrict file upload by file extension (#8539)
This commit is contained in:
@@ -465,6 +465,11 @@ export class Config {
|
||||
} else if (typeof fileUpload.enableForAuthenticatedUser !== 'boolean') {
|
||||
throw 'fileUpload.enableForAuthenticatedUser must be a boolean value.';
|
||||
}
|
||||
if (fileUpload.fileExtensions === undefined) {
|
||||
fileUpload.fileExtensions = FileUploadOptions.fileExtensions.default;
|
||||
} else if (!Array.isArray(fileUpload.fileExtensions)) {
|
||||
throw 'fileUpload.fileExtensions must be an array.';
|
||||
}
|
||||
}
|
||||
|
||||
static validateIps(field, masterKeyIps) {
|
||||
|
||||
Reference in New Issue
Block a user