Fix upload.js existing attachment (#3376)
This commit is contained in:
parent
72ba2b41d5
commit
dba2f4e8f0
1 changed files with 7 additions and 5 deletions
|
|
@ -194,15 +194,17 @@ frappe.upload = {
|
|||
$(document).on('upload_complete', on_upload);
|
||||
|
||||
function upload_next() {
|
||||
i += 1;
|
||||
var file = files[i];
|
||||
args.is_private = file.is_private;
|
||||
if(files) {
|
||||
i += 1;
|
||||
var file = files[i];
|
||||
args.is_private = file.is_private;
|
||||
frappe.show_progress(__('Uploading'), i+1, files.length);
|
||||
}
|
||||
frappe.upload.upload_file(file, args, opts);
|
||||
frappe.show_progress(__('Uploading'), i+1, files.length);
|
||||
}
|
||||
|
||||
function on_upload(e, attachment) {
|
||||
if (i === files.length - 1) {
|
||||
if (!files || i === files.length - 1) {
|
||||
$(document).off('upload_complete', on_upload);
|
||||
frappe.hide_progress();
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue