ZF-6669: Amazon S3 Stream Wrapper - Upload & Uri

Issue Type: New Feature Created: 2009-05-15T02:37:41.000+0000 Last Updated: 2009-05-15T10:08:00.000+0000 Status: Resolved Fix version(s): - 1.8.2 (27/May/09)

Reporter: vincent (vistahr) Assignee: Stanislav Malyshev (stas) Tags: - Zend_Service_Amazon

  • Zend_Uri

Related issues: Attachments:


Iam using the S3 Stream Wrapper, but there is no way add a variable scheme to Zend_Uri.

I´ve fixed it very dirty, and add the registerd s3 scheme in Zend/Uri.php. switch ($scheme) { case 's3': $className = 'Zend_Uri_Http'; break;

The curios is , ive 3 upload elements and try to upload 3 files via Zend_File.

very simple: $uri = Zend_Uri::factory('s3://test-test-b/') $adapter->setDestination($uri->getUri()); $adapter->receive()

I uploaded 3 files "a_3.png","a_2.png","a_1.png" and all works fine.

But when iam trying to upload these files: "a 3.png","a_2.png","a_1.png" (look at the space)

I get this exception:

Fatal error: Uncaught exception 'Zend_Uri_Exception' with message 'Invalid URI supplied' in ...library/Zend/Uri/Http.php:156 Stack trace:

0 .../library/Zend/Uri.php(135): Zend_Uri_Http->__construct('http', '//s3.amazonaws....')

1 .../library/Zend/Http/Client.php(261): Zend_Uri::factory('http://s3.amazo...')

2 .../library/Zend/Service/Amazon/S3.php(366): Zend_Http_Client->setUri('http://s3.amazo...')

3 .../library/Zend/Service/Amazon/S3.php(150): Zend_Service_Amazon_S3->_makeRequest('HEAD', 'test-test-b/use...')

4...library/Zend/Service/Amazon/S3/Stream.php(439): Zend_Service_Amazon_S3->getInfo('test-test-b/use...')

5 [internal function]: Zend_Service_Amazon_S3_Stream->url_stat('s3:// in ...library/Zend/Uri/Http.php on line 156

Same Problem, when iam trying to upload a file named "äpicture.jpg". I dont know why the class is using the http adapter when iam using a file with a space or an german char.


Posted by Matthew Weier O'Phinney (matthew) on 2009-05-15T06:47:01.000+0000

Assigning to Stas.

Posted by Stanislav Malyshev (stas) on 2009-05-15T10:08:00.000+0000

Seems to be duplicate for ZF-6540, both fixed

Have you found an issue?

See the Overview section for more details.


© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.