Skip to content
Snippets Groups Projects
Commit eceb8b67 authored by Neuber, Eugen Ramon's avatar Neuber, Eugen Ramon :speech_balloon: Committed by Reiter, Christoph
Browse files

Deny files with size 0 bytes

See issue #1
parent 0c973e9d
No related branches found
No related tags found
No related merge requests found
......@@ -149,6 +149,10 @@ export class FileUpload extends ScopedElementsMixin(VPULitElement) {
// we need to copy the files to another array or else they will be gone in the setTimeout function!
let tempFilesToHandle = [];
await commonUtils.asyncArrayForEach(files, async (file) => {
if (file.size === 0) {
console.log('file ' + file.name + ' has size=0 and is denied!')
return;
}
tempFilesToHandle.push(file);
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment