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)) {
result = true;
var id = ID();
this.onFileInserted(item.getAsFile(), id);
this.uploadFile(item.getAsFile(), id);
var file = item.getAsFile();
if (file !== null) {
this.onFileInserted(file, id);
this.uploadFile(file, id);
}
}
}
}