Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have a new site and a local and an s3 container bundled in a class. if i upload a file to that class the file gets shown by a preview link with that url
system/storage/serve/13/dsc_1091.jpg
The problem is that this url in the node edit screen is not found 404. I have to wait until the cron copies the file to s3 then the url points to s3 which is the final storage place. The s3 url works normal. I would be happy for a tip what this behaviror could be causing.
Comments
Comment #2
fox_01 CreditAttribution: fox_01 commentedComment #3
Perignon CreditAttribution: Perignon commentedWhat content type is the file attached to?
Does your PHP support file streams?
Comment #4
fox_01 CreditAttribution: fox_01 commentedI dont know which setting sou mean exactly but i found that in php info
Comment #5
Perignon CreditAttribution: Perignon commentedAre these images styled images?
Comment #6
Perignon CreditAttribution: Perignon commentedThis issue could be related to #2652222: Taxonomy term image field not rendering correctly
Comment #7
inquis CreditAttribution: inquis as a volunteer commentedI have the same issue.
Until I run cron, on the node edit page the url to styled image's preview is like /system/storage/serve/50/1381_2.jpg?itok=JD3w0ki7, which returns 404.
Looking storage_menu() hook, all we have is system/storage/serve/%storage_menu route, so it knows nothing about filename /1381_2.jpg.
It seems like the problem is in the function path() of storage_api/storage.inc on the line 431:
Changing to the following seems to work for me:
Comment #8
Perignon CreditAttribution: Perignon commentedWithout the storage ID, you will not be able to build multiple containers.
Comment #9
inquis CreditAttribution: inquis as a volunteer commentedIt seems like the file name makes a problem, not the storage ID.
Before:
/system/storage/serve/50/1381_2.jpg
after:
/system/storage/serve/50
In this example, storage_id is 50 and file name is 1381_2.jpg