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.
Comment | File | Size | Author |
---|---|---|---|
#4 | 2790311-4-default-file-scheme.patch | 2.65 KB | achap |
| |||
#2 | 2790311-default-file-scheme.patch | 2.54 KB | achap |
Issue fork remote_stream_wrapper-2790311
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
achapThis patch will use the default file scheme and fall back to public if nothing is set. Have included a Kernel test.
Comment #3
achapComment #4
achapMissing group
Comment #5
Dave ReidI think this testing is incomplete without also testing to ensure the routing works as well. There are still references to the hard-coded public file system in \Drupal\remote_stream_wrapper\Routing\RemoteImageStyleRoutes.
Comment #6
achapThanks for the feedback.
I spent some time looking at the relevant code but I'm having a hard time understanding how the code in RemoteImageStyleRoutes and RemoteImageStyleDownloadController is used. There doesn't appear to be any documentation to explain their usage either in this module or the core classes that they override. The only clues I have found are 'Defines a route subscriber to register a url for serving image styles.' for RemoteImageStyleRoutes and 'Defines a controller to serve image styles.' for the controller.
I'm using the above patch on my site alongside flysystem_s3 and my image styles are generating just fine and being stored in s3.
Are you able to provide some context on their purpose?
Comment #7
Dave ReidComment #9
Dave ReidAfter review we don't need to update RemoteImageStyleRoutes, we only need to override the public directory path since that's what the original route in \Drupal\image\Routing\ImageStyleRoutes::routes() sets.
Comment #11
Dave Reid