Reorganize usage of getAsFile()

Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
This commit is contained in:
Sheogorath 2018-03-18 03:06:11 +01:00
parent 41bf7cc52f
commit 6219962892
No known key found for this signature in database
GPG key ID: 1F05CC3635CDDFFD

View file

@ -370,8 +370,11 @@
if (this.isFileAllowed(item)) { if (this.isFileAllowed(item)) {
result = true; result = true;
var id = ID(); var id = ID();
this.onFileInserted(item.getAsFile(), id); var file = item.getAsFile();
this.uploadFile(item.getAsFile(), id); if (file !== null) {
this.onFileInserted(file, id);
this.uploadFile(file, id);
}
} }
} }
} }