Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue on CKEditor integration when allow users to have their own folder #339

Closed
bestmomo opened this issue Apr 14, 2015 · 20 comments
Closed

Comments

@bestmomo
Copy link

Hello,

CKEditor integration works fine in classical way. But if I follow this page instructions to allow users to have their own folder I get images with wrong path.

To get it working I set this in config :

"serverRoot": false,
"fileRoot": "/",

And I use setFileRoot to set the good path. And filemanager is working fine in this path.

But when I use it in CKEditor I get :

src="http://localhostE:\wamp\www\basepublic/filemanager/userfiles/greatredactor/image1.png"

Instead of :

src="http://localhost/base/public/filemanager/userfiles/greatredactor/image1.png"

What am I doing wrong ?

Thanks

@simogeo
Copy link
Owner

simogeo commented Apr 14, 2015

You can use relPath to navigate to the right folder

"relPath": "../../",

@simogeo
Copy link
Owner

simogeo commented Apr 14, 2015

But I have to admit I did not work much on this. Hope it will works. If not, let me know. I'll try to fix this soon.

@bestmomo
Copy link
Author

Thanks but I cant get it working with that, it is not a relative url issue but looks like a concat somewhere...

@simogeo
Copy link
Owner

simogeo commented Apr 15, 2015

Should be ok now ! Please download latest version.

Note that relPath has been explicitly renamed baseUrl

So, set baseUrl as follow :

"baseUrl": "http://localhost/base/public/filemanager/userfiles/"

"baseUrl": "http://localhost/base/public/filemanager/"

"baseUrl": "http://localhost/base/public/"

They should all work correctly !

@bestmomo
Copy link
Author

Thanks but you dont have changed filemanager.min.js ;)

@simogeo
Copy link
Owner

simogeo commented Apr 15, 2015

I did. Clear your cache and let me know !

@bestmomo
Copy link
Author

Perfect ! I use relative url :

"baseUrl": "/filemanager/",

And all works fine !

@simogeo
Copy link
Owner

simogeo commented Apr 15, 2015

Wonderful !

By the way and for your information (but you may already know)I reference your tutorial on the wiki : https://github.com/simogeo/Filemanager/wiki/Integrate-the-Filemanager-with-Laravel

@simogeo simogeo closed this as completed Apr 15, 2015
@bestmomo
Copy link
Author

Yes I saw this reference, I've updated it with new features.

@sd-design
Copy link

I have a problem with "copy URL in clipboard". When I copy missing some letter in the beginning of filename. Fore example I copy http://filemanager/uploads/file1.jpg - and I have result http://filemanager/uploads/1.jpg
Or I copy http://filemanager/uploads/folder/file2.jpg - I have result http://filemanager/uploads/r/file2.jpg
In filemanager.config.js value "baseUrl": "http://filemanager/uploads/"

@simogeo
Copy link
Owner

simogeo commented Apr 15, 2015

what is the path set with $fm->setFileRoot(); ?

@sd-design
Copy link

I found the solution: in filemanager.config.js I change value "baseUrl": false - it's work!!!!

@albricepiazza
Copy link

hi,
i would like back to my tree folder with :
"serverRoot": false,
"fileRoot": "/",
"baseUrl": "../../",

But it doesn't work ?
Can you help me?

@simogeo
Copy link
Owner

simogeo commented Jun 9, 2015

Pleas be more accurate if you want any help.

What do you want to do ? What is your folders structure ? What is your webserver root ? Where is FM installed ?

Do you call $fm->setFileRoot(); function ?

@albricepiazza
Copy link

i would like start my file tree 3 folder before my folder filemanager.
exemple :

  • /
    • folder1
      • folder11
        • filemanger
    • folder2

Like this exemple, i would like start file root at /

Thanks for your help

@albricepiazza
Copy link

ok, i have found, sorry for the disruption

serverRoot : false
baseUrl : false

@simogeo
Copy link
Owner

simogeo commented Jun 10, 2015

Assuming you have this kind of folders structure :

- /home/user/
    |
    |_____ desiredRootFolder/
                       |
                       |________ folder1/
                       |                      |
                       |                      |_____ Filmanager/
                       |
                       |________ folder2/

Something similar to this should work

"serverRoot": false,
"fileRoot": "/home/user/desiredRootFolder/",

baseUrl is only used for selecting from an editor :

"baseUrl": "http://www.mydomain.tld/my/path/",

@albricepiazza
Copy link

Thanks for your reply !

@alanhartless
Copy link

I need to be able to set baseUrl dynamically via PHP. Is that possible?

@simogeo
Copy link
Owner

simogeo commented Jun 18, 2015

Absolutely not ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants