@@ -176,14 +176,14 @@ discard block |
||
| 176 | 176 | $data = []; |
| 177 | 177 | if (!empty($customData)) { |
| 178 | 178 | foreach ($customData as $key => $value) { |
| 179 | - $callbackVar['x:' . $key] = $value; |
|
| 180 | - $data[$key] = '${x:' . $key . '}'; |
|
| 179 | + $callbackVar['x:'.$key] = $value; |
|
| 180 | + $data[$key] = '${x:'.$key.'}'; |
|
| 181 | 181 | } |
| 182 | 182 | } |
| 183 | 183 | |
| 184 | - $callbackParam = [ |
|
| 184 | + $callbackParam = [ |
|
| 185 | 185 | 'callbackUrl' => $callBackUrl, |
| 186 | - 'callbackBody' => 'filename=${object}&size=${size}&mimeType=${mimeType}&height=${imageInfo.height}&width=${imageInfo.width}&' . urldecode(http_build_query($data)), |
|
| 186 | + 'callbackBody' => 'filename=${object}&size=${size}&mimeType=${mimeType}&height=${imageInfo.height}&width=${imageInfo.width}&'.urldecode(http_build_query($data)), |
|
| 187 | 187 | 'callbackBodyType' => 'application/x-www-form-urlencoded', |
| 188 | 188 | ]; |
| 189 | 189 | $callbackString = json_encode($callbackParam); |
@@ -194,7 +194,7 @@ discard block |
||
| 194 | 194 | $expiration = $this->gmt_iso8601($end); |
| 195 | 195 | |
| 196 | 196 | // 最大文件大小.用户可以自己设置 |
| 197 | - $condition = [ |
|
| 197 | + $condition = [ |
|
| 198 | 198 | 0 => 'content-length-range', |
| 199 | 199 | 1 => 0, |
| 200 | 200 | 2 => $contentLengthRangeValue, |
@@ -225,7 +225,7 @@ discard block |
||
| 225 | 225 | $response['expire'] = $end; |
| 226 | 226 | $response['callback'] = $base64CallbackBody; |
| 227 | 227 | $response['callback-var'] = $callbackVar; |
| 228 | - $response['dir'] = $prefix; // 这个参数是设置用户上传文件时指定的前缀。 |
|
| 228 | + $response['dir'] = $prefix; // 这个参数是设置用户上传文件时指定的前缀。 |
|
| 229 | 229 | |
| 230 | 230 | return json_encode($response); |
| 231 | 231 | } |
@@ -426,7 +426,7 @@ discard block |
||
| 426 | 426 | */ |
| 427 | 427 | public function createDir($dirname, Config $config) |
| 428 | 428 | { |
| 429 | - $defaultFile = trim($dirname, '/') . '/oss.txt'; |
|
| 429 | + $defaultFile = trim($dirname, '/').'/oss.txt'; |
|
| 430 | 430 | |
| 431 | 431 | return $this->write($defaultFile, '当虚拟目录下有其他文件时,可删除此文件~', $config); |
| 432 | 432 | } |
@@ -478,7 +478,7 @@ discard block |
||
| 478 | 478 | { |
| 479 | 479 | $path = $this->applyPathPrefix($path); |
| 480 | 480 | |
| 481 | - return $this->normalizeHost() . ltrim($path, '/'); |
|
| 481 | + return $this->normalizeHost().ltrim($path, '/'); |
|
| 482 | 482 | } |
| 483 | 483 | |
| 484 | 484 | /** |
@@ -612,7 +612,7 @@ discard block |
||
| 612 | 612 | if ($this->isCName) { |
| 613 | 613 | $domain = $this->endpoint; |
| 614 | 614 | } else { |
| 615 | - $domain = $this->bucket . '.' . $this->endpoint; |
|
| 615 | + $domain = $this->bucket.'.'.$this->endpoint; |
|
| 616 | 616 | } |
| 617 | 617 | |
| 618 | 618 | if ($this->useSSL) { |
@@ -621,7 +621,7 @@ discard block |
||
| 621 | 621 | $domain = "http://{$domain}"; |
| 622 | 622 | } |
| 623 | 623 | |
| 624 | - return rtrim($domain, '/') . '/'; |
|
| 624 | + return rtrim($domain, '/').'/'; |
|
| 625 | 625 | } |
| 626 | 626 | |
| 627 | 627 | /** |