When submitting the file entity upload form, the "file destination" URI isn't passed through file_stream_wrapper_uri_normalize. In a basic case, it's possible for $file->uri to be needing relative paths to be resolved. However, for other stream wrappers, they may have special requirements in the structure of a URI. Combined with #2479523: Add a hook_file_stream_wrapper_uri_normalize_alter() hook this will let the media_internet module upload files to S3.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

deviantintegral’s picture

larowlan’s picture

I think needs tests, but other than that - looks good to me

Dave Reid’s picture

Looks like this is also missing the same code if the scheme is changed on the file edit form (which causes a file_move() as well).

  • Dave Reid committed 6a68fbd on 7.x-2.x
    Issue #2482757 by deviantintegral, Dave Reid: Call...
Dave Reid’s picture

Status: Needs review » Fixed

Committed #3 to 7.x-2.x.

Status: Fixed » Closed (fixed)

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

Elijah Lynn’s picture

This is in 7.x-2.0-beta2 for anyone wondering.