Enable private download method and set 'File system path' to 'files/' instead of 'files'.
Note that after submitting, it will still say 'files' because file_check_directory() removes the '/'. Don't resubmit or the variable will go back to 'files'.
file_create_url() will now return urls such as
http://192.168.0.1/sites/op_video/system/files/files/videos/image-cache/89_third_320x240.jpeg
instead of
http://192.168.0.1/sites/op_video/system/files/videos/image-cache/89_third_320x240.jpeg
The attached patch fixes this problem by stripping '/'s from the end of the path in file_directory_path() in the same way as file_check_directory() does.
| Comment | File | Size | Author |
|---|---|---|---|
| file_directory_path.patch | 636 bytes | jbrown |
Comments
Comment #1
drummI would like to see this written for the development version first, and then backported.
I think a better fix might be never storing a files directory path with a trailing slash. Probably by stripping the extra slash on saving the settings form.
Comment #2
codecowboy commentedThis should no longer be an issue with D7. This part of the code base has been completely rewritten.