--- S3.php 2009-06-02 10:33:18.000000000 +0200 +++ S3.php.new 2009-06-02 10:28:08.000000000 +0200 @@ -62,9 +62,10 @@ * Add a new bucket * * @param string $bucket + * @param boolean $inEu * @return boolean */ - public function createBucket($bucket) + public function createBucket($bucket, $inEu = false) { $len = strlen($bucket); if ($len < 3 || $len > 255) { @@ -91,7 +92,13 @@ throw new Zend_Service_Amazon_S3_Exception("Bucket name \"$bucket\" cannot be an IP address"); } - $response = $this->_makeRequest('PUT', $bucket); + if ($inEu) { + $data = 'EU'; + } else { + $data = null; + } + + $response = $this->_makeRequest('PUT', $bucket, null, array(), $data); return ($response->getStatus() == 200); }