From 99ab3d133cc0e32a5114bf225aff4171416caaa4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Guillaume=20Perr=C3=A9al?= <guillaume.perreal@irstea.fr>
Date: Wed, 28 Jan 2015 15:18:39 +0100
Subject: [PATCH] =?UTF-8?q?js:=20fusionne=20les=20d=C3=A9finitions=20de=20?=
 =?UTF-8?q?fichier=20renvoy=C3=A9es=20par=20le=20serveur=20les=20donn?=
 =?UTF-8?q?=C3=A9es=20qu'on=20avait=20d=C3=A9j=C3=A0.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 Resources/js/widget/file_upload.js | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/Resources/js/widget/file_upload.js b/Resources/js/widget/file_upload.js
index a38120a8..823a69c0 100644
--- a/Resources/js/widget/file_upload.js
+++ b/Resources/js/widget/file_upload.js
@@ -161,7 +161,14 @@
                         $this.find('.progress-bar').css('width', percent + '%').attr('aria-valuenow', percentText);
                         $this.find('.progress-text').show().html(percentText + '% ('+formatBitrate(data.bitrate)+')');
                     });
-                }
+                },
+                getFilesFromResponse: function(data) {
+                    var files = [];
+                    $.each(data.files, function(index, file) {
+                        files.push($.extend(file, data.result.files[index]));
+                    });
+                    return files;
+                },
             }
         )).bind({
             fileuploadfailed: function (e, data) {
-- 
GitLab