[FIX] Empty white list enables all media types upload (#1077)
This commit is contained in:
parent
d80dd0e2ce
commit
ec987b1a75
|
@ -166,8 +166,9 @@ export default class UploadModal extends Component {
|
|||
if (file.size > FileUpload_MaxFileSize) {
|
||||
return false;
|
||||
}
|
||||
// if white list is empty, all media types are enabled
|
||||
if (!FileUpload_MediaTypeWhiteList) {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
const allowedMime = FileUpload_MediaTypeWhiteList.split(',');
|
||||
if (allowedMime.includes(file.mime)) {
|
||||
|
|
Loading…
Reference in New Issue