Using a remote file scheme does not work

Created on 4 December 2018, about 6 years ago
Updated 31 July 2023, over 1 year ago

I'm attempting to use this module alongside the s3fs module which stores images using the s3:// file scheme instead of public://.

This registers correctly as a remote filesystem, which means this module first writes a temporary local file with imagick and then moves it afterwards.

Trouble is, the destination prepends the image format to the file uri, so the temp path eventually becomes JPEG:/tmp/imagick_HASH. That's totally fine to pass off to imagick, but file_unmanaged_move is unable to use that to later move the file.

I've written a patch and actually pulled the bit prepending the filetype all-together. From what I can tell, this is a way to tell imagick to ignore the file's type and force saving to a particular type, but this module was grabbing the prepended value by analyzing the file type so it's seemingly redundant unless I'm missing something.

I have a TODO concerning a check being run to validate the file scheme, it looks like that should probably error? I'm not sure that that check should say 'no, invalid, just continue as if you didn't see it' but I'm also not sure the use case there.

πŸ› Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States aguilarm Austin, TX

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.

  • πŸ‡ΊπŸ‡ΈUnited States pingevt

    For anyone else looking, the patch in #9 works great for the 1.5 branch of this module, and is only partially applied to the 1.6 branch but I am receiving errors. Currently a bit slammed, but will be looking into resolving this and rolling a new patch by the end of August as I need to work on getting a site D10 ready.

  • First commit to issue fork.
Production build 0.71.5 2024