fixed js error in composer

v1.18.x
Baris Soner Usakli 11 years ago
parent 0756410684
commit 0ec9f3835f

@ -552,13 +552,15 @@ define(['taskbar'], function(taskbar) {
if(items && items.length) { if(items && items.length) {
var blob = items[0].getAsFile(); var blob = items[0].getAsFile();
blob.name = 'upload-'+ utils.generateUUID(); if(blob) {
blob.name = 'upload-'+ utils.generateUUID();
var fd = new FormData(); var fd = new FormData();
fd.append('files[]', blob, blob.name); fd.append('files[]', blob, blob.name);
fileForm[0].reset(); fileForm[0].reset();
uploadSubmit([blob], post_uuid, '/api/post/upload', fd); uploadSubmit([blob], post_uuid, '/api/post/upload', fd);
}
} }
}); });
} }

Loading…
Cancel
Save