mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-09 16:25:12 +03:00
don't upload empty files
This commit is contained in:
@@ -44,6 +44,9 @@ module.exports = function(state, emit) {
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
const target = event.target;
|
const target = event.target;
|
||||||
const file = target.files[0];
|
const file = target.files[0];
|
||||||
|
if (file.size === 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
await fadeOut('page-one');
|
await fadeOut('page-one');
|
||||||
emit('upload', { file, type: 'click' });
|
emit('upload', { file, type: 'click' });
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user