Problem/Motivation

Steps to reproduce:

  • Create an image field using s3 stream wrapper.
  • Upload a file.
  • Attempt to save node results in fatal.
  • getimagesize call inside image_get_info tries to do a seek on the remote stream
  • seeking on a remote stream isn't supported for memory reasons
  • getimagesize returns false
  • attempt to write image width/height values into field tables results in an sql error

Proposed resolution

Borrow from s3fs project and wrap the guzzle body object in a cached stream - which does support seeking, by reading the remote file into temporary memory
This only impacts content editors so memory impact isn't large unless you're allowing open content-creation.

Remaining tasks

Review

User interface changes

None

API changes

None

Data model changes

CommentFileSizeAuthor
#1 getimagesize.patch2.27 KBlarowlan
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

larowlan’s picture

Status: Active » Needs review
FileSize
2.27 KB
larowlan’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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