Issue with image style routes not displaying correctly

Created on 2 August 2018, over 6 years ago
Updated 7 November 2023, about 1 year ago

I've found an issue where the image style route (/s3/files/...) is not being formatted in the way that S3fsImageStyleDownloadController expects it to be. This results in the image not displaying, because S3fsImageStyleDownloadController is not able to deliver the correct path to the file.

For example, I upload a public file that goes to public://2018-08/test.png. When I load a page that then wants to use an image style for that image, the image style doesn't yet exist on s3, so it uses the path: /s3/files/styles/thumbnail/public/2018-08/test.png. However, the route expected should be /s3/files/styles/{image_style}/{scheme} and S3fsImageStyleDownloadController->deliver() expects that "file" is passed as a query parameter. So the URI should be: /s3/files/styles/thumbnail/public?file=2018-08/test.png. By changing the path to that in S3fsStream.php it works.

I have a patch that I will attach here.

🐛 Bug report
Status

Closed: cannot reproduce

Version

3.0

Component

Code

Created by

🇺🇸United States bdlangton

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024