@@ -143,19 +143,19 @@ private function createPresignedUrl(RequestInterface $request, $expires) {
143143 public function getPresignetUrl ($ method , $ args , $ expires = null ) {
144144 $ command = $ this ->getCommand ($ method , $ args );
145145 $ request = $ this ->commandToRequestTransformer ($ command );
146- return ( $ expires == null ) ? $ this ->createPresignedUrl ($ request , $ expires) : $ request -> getUri ( );
146+ return $ this ->createPresignedUrl ($ request , $ expires );
147147 }
148148
149149 public function getObjectUrl ($ bucket , $ key , $ expires = null , array $ args = array ()) {
150150 $ command = $ this ->getCommand ('GetObject ' , $ args + array ('Bucket ' => $ bucket , 'Key ' => $ key ));
151151 $ request = $ this ->commandToRequestTransformer ($ command );
152- return ( $ expires == null ) ? $ this ->createPresignedUrl ($ request , $ expires) : $ request -> getUri ( );
152+ return $ this ->createPresignedUrl ($ request , $ expires );
153153 }
154154
155155 public function upload ($ bucket , $ key , $ body , $ options = array ()) {
156156 $ body = Psr7 \stream_for ($ body );
157- $ options ['min_part_size ' ] = isset ($ options ['min_part_size ' ]) ? $ options ['min_part_size ' ] : MultipartUpload::MIN_PART_SIZE ;
158- if ($ body ->getSize () < $ options ['min_part_size ' ]) {
157+ $ options ['PartSize ' ] = isset ($ options ['PartSize ' ]) ? $ options ['PartSize ' ] : MultipartUpload::MIN_PART_SIZE ;
158+ if ($ body ->getSize () < $ options ['PartSize ' ]) {
159159 $ rt = $ this ->putObject (array (
160160 'Bucket ' => $ bucket ,
161161 'Key ' => $ key ,
@@ -175,7 +175,7 @@ public function upload($bucket, $key, $body, $options = array()) {
175175
176176 public function resumeUpload ($ bucket , $ key , $ body , $ uploadId , $ options = array ()) {
177177 $ body = Psr7 \stream_for ($ body );
178- $ options ['min_part_size ' ] = isset ($ options ['min_part_size ' ]) ? $ options ['min_part_size ' ] : MultipartUpload::MIN_PART_SIZE ;
178+ $ options ['PartSize ' ] = isset ($ options ['PartSize ' ]) ? $ options ['PartSize ' ] : MultipartUpload::DEFAULT_PART_SIZE ;
179179 $ multipartUpload = new MultipartUpload ($ this , $ body , array (
180180 'Bucket ' => $ bucket ,
181181 'Key ' => $ key ,
@@ -187,7 +187,7 @@ public function resumeUpload($bucket, $key, $body, $uploadId, $options = array()
187187
188188 public function copy ($ bucket , $ key , $ copySource , $ options = array ()) {
189189
190- $ options ['min_part_size ' ] = isset ($ options ['min_part_size ' ]) ? $ options ['min_part_size ' ] : Copy::MIN_PART_SIZE ;
190+ $ options ['PartSize ' ] = isset ($ options ['PartSize ' ]) ? $ options ['PartSize ' ] : Copy::DEFAULT_PART_SIZE ;
191191
192192 // set copysource client
193193 $ sourceConfig = $ this ->rawCosConfig ;
@@ -207,7 +207,7 @@ public function copy($bucket, $key, $copySource, $options = array()) {
207207
208208 $ contentLength =$ rt ['ContentLength ' ];
209209 // sample copy
210- if ($ contentLength < $ options ['min_part_size ' ]) {
210+ if ($ contentLength < $ options ['PartSize ' ]) {
211211 $ rt = $ this ->copyObject (array (
212212 'Bucket ' => $ bucket ,
213213 'Key ' => $ key ,
0 commit comments