Skip to content

Commit c566ba6

Browse files
authored
Merge pull request #5218 from Laravel-Backpack/fix-upload-multiple
fix upload multiple uploader
2 parents e69dc90 + b3fcccd commit c566ba6

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

src/app/Http/Controllers/Operations/ReorderOperation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ protected function setupReorderDefaults()
5050
*
5151
* Database columns needed: id, parent_id, lft, rgt, depth, name/title
5252
*
53-
* @return \Illuminate\Contracts\View\View
53+
* @return \Illuminate\Contracts\View\View
5454
*/
5555
public function reorder()
5656
{

src/app/Http/Requests/CrudRequest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,19 @@ public function rules()
3535
// OPTIONAL OVERRIDE
3636
// public function forbiddenResponse()
3737
// {
38-
// Optionally, send a custom response on authorize failure
39-
// (default is to just redirect to initial page with errors)
38+
// Optionally, send a custom response on authorize failure
39+
// (default is to just redirect to initial page with errors)
4040
//
41-
// Can return a response, a view, a redirect, or whatever else
42-
// return Response::make('Permission denied foo!', 403);
41+
// Can return a response, a view, a redirect, or whatever else
42+
// return Response::make('Permission denied foo!', 403);
4343
// }
4444

4545
// OPTIONAL OVERRIDE
4646
// public function response()
4747
// {
48-
// If you want to customize what happens on a failed validation,
49-
// override this method.
50-
// See what it does natively here:
51-
// https://github.com/laravel/framework/blob/master/src/Illuminate/Foundation/Http/FormRequest.php
48+
// If you want to customize what happens on a failed validation,
49+
// override this method.
50+
// See what it does natively here:
51+
// https://github.com/laravel/framework/blob/master/src/Illuminate/Foundation/Http/FormRequest.php
5252
// }
5353
}

src/app/Library/Uploaders/MultipleFiles.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public function uploadFiles(Model $entry, $value = null)
1919
{
2020
$filesToDelete = CRUD::getRequest()->get('clear_'.$this->getName());
2121
$value = $value ?? CRUD::getRequest()->file($this->getName());
22-
$previousFiles = $this->getPreviousFiles() ?? [];
22+
$previousFiles = $this->getPreviousFiles($entry) ?? [];
2323

2424
if (! is_array($previousFiles) && is_string($previousFiles)) {
2525
$previousFiles = json_decode($previousFiles, true);

0 commit comments

Comments
 (0)