File tree Expand file tree Collapse file tree 3 files changed +7
-12
lines changed Expand file tree Collapse file tree 3 files changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ public function upload()
43
43
}
44
44
45
45
if (is_array ($ uploaded_files )) {
46
- $ response = count ($ error_bag ) > 0 ? $ error_bag : parent :: $ success_response ;
46
+ $ response = count ($ error_bag ) > 0 ? $ error_bag : $ new_filename ;
47
47
} else { // upload via ckeditor 'Upload' tab
48
48
if (is_null ($ new_filename )) {
49
49
$ response = $ error_bag [0 ];
Original file line number Diff line number Diff line change @@ -256,7 +256,7 @@ public function upload($file)
256
256
// TODO should be "FileWasUploaded"
257
257
event (new ImageWasUploaded ($ new_file_path ));
258
258
259
- return $ new_file_name ;
259
+ return $ this -> pretty ( $ new_file_name)-> fill ()-> attributes ;
260
260
}
261
261
262
262
private function uploadValidator ($ file )
Original file line number Diff line number Diff line change 234
234
paramName: " upload[]" , // The name that will be used to transfer the file
235
235
uploadMultiple: false ,
236
236
parallelUploads: 5 ,
237
- timeout: 0 ,
237
+ timeout: 0 ,
238
238
clickable: ' #upload-button' ,
239
239
dictDefaultMessage: lang[' message-drop' ],
240
- init : function () {
241
- var _this = this ; // For the closure
242
- this .on (' success' , function (file , response ) {
243
- if (response === ' OK' ) {
244
- loadFolders ();
245
- } else {
246
- this .defaultOptions .error (file, response .join (' \n ' ));
247
- }
240
+ init : function () {
241
+ this .on (' success' , function (file , response ) {
242
+ loadFolders ();
248
243
});
249
- this .on (' error' , function (file , response ) {
244
+ this .on (' error' , function (file , response ) {
250
245
if (response .message !== undefined ) {
251
246
this .defaultOptions .error (file, response .message );
252
247
}
You can’t perform that action at this time.
0 commit comments