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
Upload at root dir cause change file url #3216
Comments
I think I have encountered the exact same issue as yours. I sort of figured out the cause of the issue, but due to my limited experience on this library I am really not sure what’s the best way to resolve it. When the finder is first initialized, the directory data is returned by the Now, when a file is uploaded via the This new directory information with an empty So, simply put, the root directory now no longer has a base URL defined. According to my testing, the above also happens when the local file system driver is used. But you won't see a connector URL being returned when using this driver, because in this driver, every file entry has its own URL parameter defined. When this is set, the finder will use/return this URL directly, without relying on the directory's URL to generate the file path. Now it's the As a result, since (1) the file entry doesn't have a public URL attached to it, and (2) the base URL of the root directory is now empty, the finder cannot serve the direct link. It falls back to the last resort to serve the connector’s URL, which acts as a proxy to the actual file content. I can think of a quick and dirty fix, which is to add Update 2021/1/16: I decided to extend the FlySystem adapter class and implement the |
This may be a bug in elFinder. I will start the investigation. |
@tamcy @golee I fixed the problem maybe. Can you see if the nightly build fixes this issue? |
I'm using aws s3 plugin for elfinder and there is a little issue on upload
If I upload a file to root directory then file url is changed weird.
(
file.url
from getFileCallback, handlers.select: just after upload):http://localhost/elfinder/connector?cmd=file&target=fls1_7Iqk7YGs66aw7IO3IDIwMjAtMTAtMTMg7Jik7ZuEIDQzNC41MjExLjEyLTEucG5n
After refresh or reconnect to finder, the
file.url
changes to normal.For example (what i want):
https://davmobxdwmerj.cloudfront.net/storage/myfilename.png
In case of uploading to subfolder (not root), there are no problems. It shows correct cloudfront path.
Followings are my settings
The text was updated successfully, but these errors were encountered: