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.

Command icon 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

vselivanov created an issue. See original summary.

vselivanov’s picture

Status: Active » Needs review

mostepaniukvm made their first commit to this issue’s fork.

mostepaniukvm’s picture

We 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

mostepaniukvm’s picture

Uploaded patch for latest changes

a.milkovsky made their first commit to this issue’s fork.

a.milkovsky’s picture

I 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.

a.milkovsky’s picture

loze’s picture

Patch in #8 works for me. Thanks.

a.milkovsky’s picture

Status: Needs review » Reviewed & tested by the community

Changing to RTBC

heddn’s picture

Status: Reviewed & tested by the community » Needs work
tjhellmann’s picture

Here is an updated patch for the latest 8.x-1.x-dev. We've tested this with our S3 setup and it is working.

heddn’s picture

Status: Needs work » Needs review
heddn’s picture

Status: Needs review » Fixed

  • heddn committed 09a59423 on 8.x-1.x authored by tjhellmann
    Issue #3284307 by a.milkovsky, vselivanov, tjhellmann, heddn: Add remote...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.