Hello there, I am trying to print links via file_create_url($uri) and unfortunately, this breaks occasionally when using Storage API. The function will return a non-existant local path after Cron has moved the files to a remote storage and thus confront the end-user with a 404 error.
After changing the display method of the container (Serve by redirection to Serve source URL and vice versa), the error is gone but will sporadically re-appear with new files.
What could be the reason for this and how can we fix it?

Comments

30equals’s picture

Yup, got the same problem.

For instance, when using the FTP class, the upload to a subfolder works. But when the image needs to get displayed, it returns the path without any subfolders, so the file doesn't get found..

wmnnd’s picture

jbrown, could you maybe comment on this?

jbrown’s picture

Which uri are you passing to file_create_url()?

wmnnd’s picture

Well, the uri that is provided by the field, i. e. $item['#item']['uri']

Perignon’s picture

Issue summary: View changes
Status: Active » Fixed

Was this resolved? I am trying to get a clean slate on the issue queue for this module. If this was not resolved, please reopen the issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.