[BUGFIX] Drag&Drop upload broken after PSR-7 change 25/44225/2
authorFrans Saris <franssaris@gmail.com>
Thu, 22 Oct 2015 13:48:18 +0000 (15:48 +0200)
committerMarkus Klein <markus.klein@typo3.org>
Thu, 22 Oct 2015 14:31:33 +0000 (16:31 +0200)
Resolves: #70955
Releases: master
Change-Id: I8d4fdf1a2cf0db8cbccdc96306ba78e029da3abf
Reviewed-on: https://review.typo3.org/44225
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Tymoteusz Motylewski <t.motylewski@gmail.com>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/backend/Classes/Controller/File/FileController.php
typo3/sysext/backend/Resources/Public/JavaScript/DragUploader.js

index 97fc50f..a2b2403 100644 (file)
@@ -227,11 +227,7 @@ class FileController
                     }
                 }
             }
-            $content = ['result' => $flatResult];
-            if ($this->redirect) {
-                $content['redirect'] = $this->redirect;
-            }
-            $response->getBody()->write(json_encode($content));
+            $response->getBody()->write(json_encode($flatResult));
         }
         return $response;
     }
index c08d710..b441938 100644 (file)
@@ -416,7 +416,7 @@ define(['jquery', 'moment', 'nprogress', 'TYPO3/CMS/Backend/Modal', 'TYPO3/CMS/L
                                me.$progressBar.outerWidth('100%');
 
                                // replace file icon
-                               if (data.result.upload[0].icon) {
+                               if (data.upload[0].icon) {
                                        me.$iconCol.html('<a href="#" class="t3-js-clickmenutrigger" data-table="' + data.upload[0].id + '" data-listframe="1">' + data.upload[0].icon + '&nbsp;</span></a>');
                                }