Fix file verification on upload; just block folders (#4442)
This commit is contained in:
parent
9c6822f62d
commit
d1beb2e1ad
1 changed files with 1 additions and 1 deletions
|
@ -67,7 +67,7 @@ export default ({ className }: WithClassname) => {
|
|||
const onFileSubmission = (files: FileList) => {
|
||||
clearAndAddHttpError();
|
||||
const list = Array.from(files);
|
||||
if (list.some((file) => !file.type && file.size % 4096 === 0)) {
|
||||
if (list.some((file) => !file.size || (!file.type && file.size === 4096))) {
|
||||
return addError('Folder uploads are not supported at this time.', 'Error');
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue