Laravel-filemanager: Issue with uploaded image url

Created on 8 Aug 2016  路  8Comments  路  Source: UniSharp/laravel-filemanager

The image was uploaded successfully into 'public/photos/1/57a8f5aaaf2b3.jpg' through the 'browse server' button , but when I clicked the uploaded image to insert it into ckeditor, the returned url was http://localhost/photos1/57a8f5aaaf2b3.jpg. Looks like a '/' is missing between the 'photos' directory and the user_id directory. Consequently, I cannot insert the image into ckeditor. It works well if I upload the image through the ckeditor "upload" button.
Hopefully someone can help fix the issue. Thanks!

bug done

Most helpful comment

It worked after I removed the following from vendor/unisharp/laravel-filemanager/src/views/script.blade.php

if (path.indexOf(ds) === 0) {
path = path.substring(1);
}

All 8 comments

It worked after I removed the following from vendor/unisharp/laravel-filemanager/src/views/script.blade.php

if (path.indexOf(ds) === 0) {
path = path.substring(1);
}

Thanks @bbryan0904. I was facing the same issue and your solution just solved it.

i have same issue...thank you very much @bbryan0904

nice one already fix it, i hope the the developers fix this soon [URGENT]

Thanks @bbryan0904 , this will be fixed in three days.

Updating to 1.6.1 would solve this.

This also worked for me by replacing the code at line 350 (_vendor/unisharp/laravel-filemanager/src/views/script.blade.php_).

if (path !== ds) {
item_url = item_url + path + ds;
} else {
item_url = item_url + ds;
}

I doesn't see file _"vendor/unisharp/laravel-filemanager/src/views/script.blade.php"_ in v2.1. How to fix this on v2.1?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lukaszevo picture lukaszevo  路  4Comments

fahadhowlader picture fahadhowlader  路  5Comments

sanvu88 picture sanvu88  路  3Comments

phamtien9819 picture phamtien9819  路  5Comments

anasmorahhib picture anasmorahhib  路  5Comments