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.
Assigning to Stas.