@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | $prefix = ltrim($prefix, '/'); |
| 115 | 115 | } |
| 116 | 116 | |
| 117 | - $callbackParam = [ |
|
| 117 | + $callbackParam = [ |
|
| 118 | 118 | 'callbackUrl' => $callBackUrl, |
| 119 | 119 | 'callbackBody' => 'filename=${object}&size=${size}&mimeType=${mimeType}&height=${imageInfo.height}&width=${imageInfo.width}', |
| 120 | 120 | 'callbackBodyType' => "application/x-www-form-urlencoded", |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | $expiration = $this->gmt_iso8601($end); |
| 128 | 128 | |
| 129 | 129 | // 最大文件大小.用户可以自己设置 |
| 130 | - $condition = [ |
|
| 130 | + $condition = [ |
|
| 131 | 131 | 0 => 'content-length-range', |
| 132 | 132 | 1 => 0, |
| 133 | 133 | 2 => 1048576000, |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | $conditions[] = $start; |
| 143 | 143 | |
| 144 | 144 | |
| 145 | - $arr = [ |
|
| 145 | + $arr = [ |
|
| 146 | 146 | 'expiration' => $expiration, |
| 147 | 147 | 'conditions' => $conditions, |
| 148 | 148 | ]; |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | $response['signature'] = $signature; |
| 159 | 159 | $response['expire'] = $end; |
| 160 | 160 | $response['callback'] = $base64_callback_body; |
| 161 | - $response['dir'] = $prefix; // 这个参数是设置用户上传文件时指定的前缀。 |
|
| 161 | + $response['dir'] = $prefix; // 这个参数是设置用户上传文件时指定的前缀。 |
|
| 162 | 162 | |
| 163 | 163 | return json_encode($response); |
| 164 | 164 | } |
@@ -385,7 +385,7 @@ discard block |
||
| 385 | 385 | */ |
| 386 | 386 | public function getUrl($path) |
| 387 | 387 | { |
| 388 | - return $this->normalizeHost() . ltrim($path, '/'); |
|
| 388 | + return $this->normalizeHost().ltrim($path, '/'); |
|
| 389 | 389 | } |
| 390 | 390 | |
| 391 | 391 | /** |
@@ -523,14 +523,14 @@ discard block |
||
| 523 | 523 | if ($this->isCName) { |
| 524 | 524 | $domain = $this->endpoint; |
| 525 | 525 | } else { |
| 526 | - $domain = $this->bucket . '.' . $this->endpoint; |
|
| 526 | + $domain = $this->bucket.'.'.$this->endpoint; |
|
| 527 | 527 | } |
| 528 | 528 | |
| 529 | 529 | if (0 !== stripos($domain, 'https://') && 0 !== stripos($domain, 'http://')) { |
| 530 | 530 | $domain = "http://{$domain}"; |
| 531 | 531 | } |
| 532 | 532 | |
| 533 | - return rtrim($domain, '/') . '/'; |
|
| 533 | + return rtrim($domain, '/').'/'; |
|
| 534 | 534 | } |
| 535 | 535 | |
| 536 | 536 | /** |
@@ -22,6 +22,6 @@ |
||
| 22 | 22 | $pos = strpos($expiration, '+'); |
| 23 | 23 | $expiration = substr($expiration, 0, $pos); |
| 24 | 24 | |
| 25 | - return $expiration . "Z"; |
|
| 25 | + return $expiration."Z"; |
|
| 26 | 26 | } |
| 27 | 27 | } |
| 28 | 28 | \ No newline at end of file |