- First commit to issue fork.
- ๐ฎ๐ณIndia Shreya_98
Shreya_th โ made their first commit to this issueโs fork.
- @shreya_th opened merge request.
- ๐ฎ๐ณIndia Shreya_98
Hi @jcnventura,
we can modify the file_resource_retrieve() function to directly use the file URI without attempting to convert it to an absolute path. I made changes in the code and created MR . Kindly review the changes.Thank you.
- ๐บ๐ธUnited States tyler.frankenstein
Thank you, @Shreya_h.
> What is the purpose of drupal_realpath() here?
From looking at the docs for drupal_realpath():
Resolves the absolute filepath of a local URI or filepath.
From my understanding, it would take an input like public://logo.png and return something like https://example.com/sites/default/files/logo.png.
> Reversing that commit fixed an issue for me with serving images from S3.
Yeah, I see the docs mention:
it does not work for remote URIs.
I don't know if removing the call to drupal_realpath() would be safe for local URIs and I'd want to see/do some tests before committing.