UniSharp / laravel-filemanager

Media gallery with CKEditor, TinyMCE and Summernote support. Built on Laravel file system.
https://unisharp.github.io/laravel-filemanager/
MIT License
2.06k stars 722 forks source link

Problem with redirection after uploading image (json response) #952

Open ndiiorio opened 4 years ago

ndiiorio commented 4 years ago

Hi, im having an issue with the filemanager, when i upload an image via the upload tab, it does not redirect me back to the home tab with the url, it just gives back the url. It's very weird. I tried downgrading to 2.0, and even changing the ckeditor version but still no luck.

Operating system : Linux Laravel version : 6.2 Package version : 2.1 CKEditor version : 4.9.0

Screen Shot 2020-06-22 at 09 02 49

I would appreciate any help. Thanks

mafftor commented 4 years ago

Hi, this is because of this guy https://github.com/UniSharp/laravel-filemanager/commit/990d163d346cf1c2baf45d7fd2bec3d1c3daa0fe who commited to the master :( Use my version of this package, I try to maintain as it possible

kangdetar commented 3 years ago

I have same issue today, and solved according to this guide : Uploading Dropped or Pasted Files. it seems CKEditor 4 needs additional response from server which is 'uploaded' and 'fileName'.

composer.json "unisharp/laravel-filemanager": "^2.1", package.json "ckeditor4": "github:ckeditor/ckeditor4-releases#full/stable",

edited src/Controllers/UploadController.php line #57 into this:

                $response = [
                    'uploaded' => 1,
                    'fileName' => $new_filename,
                    'url' => $url
                ];

and now it's working properly.

sheinfeld commented 3 years ago

Can anyone commit this change?