@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | define("KS3_API_USE_HTTPS", FALSE); |
96 | 96 | //是否开启curl debug模式 |
97 | 97 | define("KS3_API_DEBUG_MODE", FALSE); |
98 | - require_once(__DIR__ . "/bin/Ks3Client.class.php"); |
|
98 | + require_once(__DIR__."/bin/Ks3Client.class.php"); |
|
99 | 99 | $client = new Ks3Client($this->accessKeyID, $this->accessKeySecret, $this->endpoint); |
100 | 100 | $content = fopen($filePath, 'rb'); |
101 | 101 | $args = [ |
@@ -103,10 +103,10 @@ discard block |
||
103 | 103 | "Key" => $object, |
104 | 104 | "Content" => [ |
105 | 105 | //要上传的内容 |
106 | - "content" => $content,//可以是文件路径或者resource,如果文件大于2G,请提供文件路径 |
|
106 | + "content" => $content, //可以是文件路径或者resource,如果文件大于2G,请提供文件路径 |
|
107 | 107 | "seek_position" => 0//跳过文件开头?个字节 |
108 | 108 | ], |
109 | - "ACL" => "public-read",//可以设置访问权限,合法值,private、public-read |
|
109 | + "ACL" => "public-read", //可以设置访问权限,合法值,private、public-read |
|
110 | 110 | "ObjectMeta" => [ |
111 | 111 | //设置object的元数据,可以设置"Cache-Control","Content-Disposition","Content-Encoding","Content-Length","Content-MD5","Content-Type","Expires"。当设置了Content-Length时,最后上传的为从seek_position开始向后Content-Length个字节的内容。当设置了Content-MD5时,系统会在服务端进行md5校验。 |
112 | 112 | "Content-Type" => "binay/ocet-stream" |