From 66f4f06dd99906283e963cd7afa720f6ffe40220 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 24 Feb 2012 23:12:14 +0100 Subject: [PATCH] if a deleted file is uploaded, finish the delete first otherwise the upload will fail because the file still exists on the server, the old file will be deleted and neither the old or new file will be left --- files/js/files.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/files/js/files.js b/files/js/files.js index bebcf4e97a..9f1f5368df 100644 --- a/files/js/files.js +++ b/files/js/files.js @@ -166,6 +166,7 @@ $(document).ready(function() { $('.file_upload_start').live('change',function(){ var form=$(this).closest('form'); + var that=this; var uploadId=form.attr('data-upload-id'); var files=this.files; var target=form.children('iframe'); @@ -173,6 +174,12 @@ $(document).ready(function() { if(files){ for(var i=0;i$('#max_upload').val()){