[FIX] Accept all media types using * (#1770)

Co-authored-by: Diego Mello <diegolmello@gmail.com>
This commit is contained in:
Djorkaeff Alexandre 2020-02-21 13:02:12 -03:00 committed by GitHub
parent 5c974990ba
commit aeb5ec7c6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -7,7 +7,7 @@ export const canUploadFile = (file, serverInfo) => {
return { success: false, error: 'error-file-too-large' }; return { success: false, error: 'error-file-too-large' };
} }
// if white list is empty, all media types are enabled // if white list is empty, all media types are enabled
if (!FileUpload_MediaTypeWhiteList) { if (!FileUpload_MediaTypeWhiteList || FileUpload_MediaTypeWhiteList === '*') {
return { success: true }; return { success: true };
} }
const allowedMime = FileUpload_MediaTypeWhiteList.split(','); const allowedMime = FileUpload_MediaTypeWhiteList.split(',');