don't upload empty files
This commit is contained in:
parent
74718d6361
commit
4b39d61ff4
1 changed files with 3 additions and 0 deletions
|
@ -44,6 +44,9 @@ module.exports = function(state, emit) {
|
|||
event.preventDefault();
|
||||
const target = event.target;
|
||||
const file = target.files[0];
|
||||
if (file.size === 0) {
|
||||
return;
|
||||
}
|
||||
await fadeOut('page-one');
|
||||
emit('upload', { file, type: 'click' });
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue