@@ -30,9 +30,9 @@ |
||
30 | 30 | }); |
31 | 31 | |
32 | 32 | Storage::disk('cosv3') |
33 | - ->addPlugin(new PutRemoteFile()) |
|
34 | - ->addPlugin(new PutRemoteFileAs()) |
|
35 | - ->addPlugin(new GetUrl()); |
|
33 | + ->addPlugin(new PutRemoteFile()) |
|
34 | + ->addPlugin(new PutRemoteFileAs()) |
|
35 | + ->addPlugin(new GetUrl()); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | /** |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | * @return [type] [description] |
54 | 54 | */ |
55 | 55 | public static function upload($bucketName, $srcPath, $dstPath, |
56 | - $bizAttr = null, $slicesize = null, $insertOnly = null) |
|
56 | + $bizAttr = null, $slicesize = null, $insertOnly = null) |
|
57 | 57 | { |
58 | 58 | if (!file_exists($srcPath)) { |
59 | 59 | return [ |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | return self::updateBase($bucketName, $path, $bizAttr); |
161 | 161 | } |
162 | 162 | |
163 | - /* |
|
163 | + /* |
|
164 | 164 | * 查询目录信息 |
165 | 165 | * @param string $bucketName bucket名称 |
166 | 166 | * @param string $path 目录路径 |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | * 'x-cos-meta-自定义内容' => '*' |
199 | 199 | */ |
200 | 200 | public static function update($bucketName, $path, |
201 | - $bizAttr = null, $authority = null, $customer_headers_array = null) |
|
201 | + $bizAttr = null, $authority = null, $customer_headers_array = null) |
|
202 | 202 | { |
203 | 203 | $path = self::normalizerPath($path); |
204 | 204 | |
@@ -283,9 +283,9 @@ discard block |
||
283 | 283 | |
284 | 284 | if (filesize($srcPath) >= self::MAX_UNSLICE_FILE_SIZE) { |
285 | 285 | return [ |
286 | - 'code' => self::COSAPI_PARAMS_ERROR, |
|
287 | - 'message' => 'file '.$srcPath.' larger then 20M, please use upload_slice interface', |
|
288 | - 'data' => [], ]; |
|
286 | + 'code' => self::COSAPI_PARAMS_ERROR, |
|
287 | + 'message' => 'file '.$srcPath.' larger then 20M, please use upload_slice interface', |
|
288 | + 'data' => [], ]; |
|
289 | 289 | } |
290 | 290 | |
291 | 291 | $expired = time() + self::EXPIRED_SECONDS; |
@@ -624,7 +624,7 @@ discard block |
||
624 | 624 | * 'x-cos-meta-自定义内容' => '*' |
625 | 625 | */ |
626 | 626 | private static function updateBase($bucketName, $path, |
627 | - $bizAttr = null, $authority = null, $custom_headers_array = null) |
|
627 | + $bizAttr = null, $authority = null, $custom_headers_array = null) |
|
628 | 628 | { |
629 | 629 | $path = self::cosUrlEncode($path); |
630 | 630 | $expired = time() + self::EXPIRED_SECONDS; |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | |
77 | 77 | $this->deleteTempFile($tmpfname); |
78 | 78 | |
79 | - $this->setContentType($path, $contents); |
|
79 | + $this->setContentType($path, $contents); |
|
80 | 80 | } catch (RuntimeException $exception) { |
81 | 81 | $this->deleteTempFile($tmpfname); |
82 | 82 | |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | Cosapi::upload($this->getBucket(), $uri, $path) |
107 | 107 | ); |
108 | 108 | |
109 | - $this->setContentType($path, stream_get_contents($resource)); |
|
109 | + $this->setContentType($path, stream_get_contents($resource)); |
|
110 | 110 | } catch (RuntimeException $exception) { |
111 | 111 | if ($exception->getCode() == -4018) { |
112 | 112 | return $this->getMetadata($path); |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | |
137 | 137 | $this->deleteTempFile($tmpfname); |
138 | 138 | |
139 | - $this->setContentType($path, $contents); |
|
139 | + $this->setContentType($path, $contents); |
|
140 | 140 | } catch (RuntimeException $exception) { |
141 | 141 | $this->deleteTempFile($tmpfname); |
142 | 142 | |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | Cosapi::upload($this->getBucket(), $uri, $path, $path, null, null, 0) |
167 | 167 | ); |
168 | 168 | |
169 | - $this->setContentType($path, stream_get_contents($resource)); |
|
169 | + $this->setContentType($path, stream_get_contents($resource)); |
|
170 | 170 | } catch (RuntimeException $exception) { |
171 | 171 | if ($exception->getCode() == -4018) { |
172 | 172 | return $this->getMetadata($path); |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | */ |
200 | 200 | public function copy($path, $newpath) |
201 | 201 | { |
202 | - $resource = $this->read($path); |
|
202 | + $resource = $this->read($path); |
|
203 | 203 | |
204 | 204 | return $this->update($newpath, $resource['contents'], new Config()); |
205 | 205 | } |