From b4f1da1c1291d745ee1f356c747842d39b3a3e2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillaume=20Perr=C3=A9al?= <guillaume.perreal@irstea.fr> Date: Thu, 22 Jan 2015 13:43:30 +0100 Subject: [PATCH] =?UTF-8?q?Ne=20tente=20de=20supprimer=20un=20fichier=20su?= =?UTF-8?q?r=20le=20serveur=20que=20s'il=20a=20=C3=A9t=C3=A9=20cr=C3=A9?= =?UTF-8?q?=C3=A9.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Resources/js/widget/file_upload.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Resources/js/widget/file_upload.js b/Resources/js/widget/file_upload.js index 3519ab96..ba876697 100644 --- a/Resources/js/widget/file_upload.js +++ b/Resources/js/widget/file_upload.js @@ -123,7 +123,9 @@ } )).bind({ fileuploadfailed: function (e, data) { - $.ajax(data.url, { type: 'DELETE' }); + if(data.url) { + $.ajax(data.url, { type: 'DELETE' }); + } }, fileuploadadded: updateButtonVisibility, fileuploadfinished: updateButtonVisibility, -- GitLab