Skip to content

Commit cc3d9dc

Browse files
author
Kamil Szymański
committed
Added some missing new keywords in FileUploader.php, semicolon in FileUpload.js and a missing 'max_file_size' option in FileManager.php
1 parent b09ed80 commit cc3d9dc

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Resources/public/js/FileUploader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ function PunkAveFileUploader(options)
5252
attempt();
5353
return false;
5454
});
55-
}
55+
};
5656

5757
if (options.blockFormWhileUploading)
5858
{

Services/FileManager.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,21 +79,20 @@ public function removeFiles($options = array())
7979
public function syncFiles($options = array())
8080
{
8181
$options = array_merge($this->options, $options);
82-
8382
// We're syncing and potentially deleting folders, so make sure
8483
// we were passed something - make it a little harder to accidentally
8584
// trash your site
8685
if (!strlen(trim($options['file_base_path'])))
8786
{
88-
throw \Exception("file_base_path option looks empty, bailing out");
87+
throw new \Exception("file_base_path option looks empty, bailing out");
8988
}
9089
if (!strlen(trim($options['from_folder'])))
9190
{
92-
throw \Exception("from_folder option looks empty, bailing out");
91+
throw new \Exception("from_folder option looks empty, bailing out");
9392
}
9493
if (!strlen(trim($options['to_folder'])))
9594
{
96-
throw \Exception("to_folder option looks empty, bailing out");
95+
throw new \Exception("to_folder option looks empty, bailing out");
9796
}
9897

9998
$from = $options['file_base_path'] . '/' . $options['from_folder'];

Services/FileUploader.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ public function handleFileUpload($options = array())
111111
'image_versions' => $sizes,
112112
'accept_file_types' => $allowedExtensionsRegex,
113113
'max_number_of_files' => $options['max_number_of_files'],
114+
'max_file_size' => $options['max_file_size'],
114115
));
115116

116117
// From https://github.com/blueimp/jQuery-File-Upload/blob/master/server/php/index.php

0 commit comments

Comments
 (0)