[FIX] Accept all media types using * (#1770)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
This commit is contained in:
parent
5c974990ba
commit
aeb5ec7c6e
|
@ -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(',');
|
||||||
|
|
Loading…
Reference in New Issue