Problem/Motivation
Use of realpath() function has a limitation for local files only. For remote files it returns FALSE.
See the documentation /core/lib/Drupal/Core/File/FileSystemInterface.php:
The use of this method is discouraged, because it does not work for remote URIs. Except in rare cases, URIs should not be manually resolved.
Proposed resolution
Replace realpath() function with stream wrapper methods.
This allows us to use remote file systems like S3 File System.
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | exif_orientation-s3-support-3284307-13.patch | 1.74 KB | tjhellmann |
| #8 | exif_orientation-s3-support-3284307-7.patch | 2.13 KB | a.milkovsky |
Issue fork exif_orientation-3284307
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 #3
vselivanovComment #5
mostepaniukvmWe encountered problem with user_picture field when using s3.
Error: Call to a member function realpath() on bool in _exif_orientation_rotate()Committed additional checking
Comment #6
mostepaniukvmUploaded patch for latest changes
Comment #8
a.milkovskyI added a small fix for an "Incorrect APP1 Exif Identifier Code" error. You can see a similar fix in https://www.drupal.org/project/exif_orientation/issues/2698681.
Comment #9
a.milkovskyComment #10
loze commentedPatch in #8 works for me. Thanks.
Comment #11
a.milkovskyChanging to RTBC
Comment #12
heddnAfter #3220370: exif_read_data(): Argument #1 ($file) cannot be empty we need a rebase and more testing.
Comment #13
tjhellmannHere is an updated patch for the latest 8.x-1.x-dev. We've tested this with our S3 setup and it is working.
Comment #14
heddnComment #15
heddn