Loading inc/aws-sdk/Guzzle/Http/CachingEntityBody.php +6 −3 Original line number Diff line number Diff line Loading @@ -68,9 +68,12 @@ class CachingEntityBody extends AbstractEntityBodyDecorator // You cannot skip ahead past where you've read from the remote stream if ($byte > $this->body->getSize()) { throw new RuntimeException( "Cannot seek to byte {$byte} when the buffered stream only contains {$this->body->getSize()} bytes" ); // Modification by Joe Hoyle, this hack is needed fot getimagesize() // to work on the stream $this->read( $byte ); //throw new RuntimeException( // "Cannot seek to byte {$byte} when the buffered stream only contains {$this->body->getSize()} bytes" //); } return $this->body->seek($byte); Loading inc/class-s3-uploads.php +2 −0 Original line number Diff line number Diff line Loading @@ -31,8 +31,10 @@ class S3_Uploads { $this->bucket_hostname = $bucket_hostname ? '//' . $bucket_hostname : 'https://' . strtok( $this->bucket, '/' ) . '.s3.amazonaws.com'; $this->s3()->registerStreamWrapper(); stream_context_set_option( stream_context_get_default(), 's3', 'seekable', true ); stream_context_set_option( stream_context_get_default(), 's3', 'ACL', Aws\S3\Enum\CannedAcl::PUBLIC_READ ); } public function filter_upload_dir( $dirs ) { Loading Loading
inc/aws-sdk/Guzzle/Http/CachingEntityBody.php +6 −3 Original line number Diff line number Diff line Loading @@ -68,9 +68,12 @@ class CachingEntityBody extends AbstractEntityBodyDecorator // You cannot skip ahead past where you've read from the remote stream if ($byte > $this->body->getSize()) { throw new RuntimeException( "Cannot seek to byte {$byte} when the buffered stream only contains {$this->body->getSize()} bytes" ); // Modification by Joe Hoyle, this hack is needed fot getimagesize() // to work on the stream $this->read( $byte ); //throw new RuntimeException( // "Cannot seek to byte {$byte} when the buffered stream only contains {$this->body->getSize()} bytes" //); } return $this->body->seek($byte); Loading
inc/class-s3-uploads.php +2 −0 Original line number Diff line number Diff line Loading @@ -31,8 +31,10 @@ class S3_Uploads { $this->bucket_hostname = $bucket_hostname ? '//' . $bucket_hostname : 'https://' . strtok( $this->bucket, '/' ) . '.s3.amazonaws.com'; $this->s3()->registerStreamWrapper(); stream_context_set_option( stream_context_get_default(), 's3', 'seekable', true ); stream_context_set_option( stream_context_get_default(), 's3', 'ACL', Aws\S3\Enum\CannedAcl::PUBLIC_READ ); } public function filter_upload_dir( $dirs ) { Loading