Skip to content

Commit a4b2ecd

Browse files
committed
fix uri path error
1 parent 2a272e3 commit a4b2ecd

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Upyun/Signature.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,12 @@ public static function getFormSignature(Config $bucketConfig, $data) {
6767
$policy = Util::base64Json($data);
6868
$signParams = array(
6969
'method' => 'POST',
70-
'uri' => '/' . $bucketConfig->bucketName . '/',
70+
'uri' => '/' . $bucketConfig->bucketName,
7171
);
72-
$signParams['date'] = isset($data['date']) ? $data['date'] : gmdate('D, d M Y H:i:s \G\M\T');
72+
if (isset($data['date'])) {
73+
$signParams['date'] = $data['date'];
74+
}
75+
7376
$signParams['policy'] = $policy;
7477
if (isset($data['content-md5'])) {
7578
$signParams['md5'] = $data['content-md5'];

0 commit comments

Comments
 (0)