88 */
99class Config {
1010 /**
11- * @var string
11+ * @var string 服务名称
1212 */
1313 public $ bucketName ;
1414 /**
15- * @var string
15+ * @var string 操作员名
1616 */
1717 public $ operatorName ;
1818 /**
19- * @var string
19+ * @var string 操作员密码 md5 hash 值
2020 */
2121 public $ operatorPassword ;
2222
2323 /**
24- * @var bool: if true, use ssl
24+ * @var bool 是否使用 https
2525 */
2626 public $ useSsl ;
2727
2828 /**
29- * @var string: REST, use rest api upload file; BLOCK use multipart api upload file; AUTO, decide by file size
29+ * @var string 上传使用的接口类型,可以设置为 `REST`:使用 rest api 上传,`AUTO` 根据文件大小自动判断,`BLOCK` 使用断点续传
30+ * 当上传小文件时,不推荐使用断点续传;上传时如果设置了异步预处理`withAsyncProcess=true`,将会使用表单 api 上传
3031 */
3132 public $ uploadType = 'AUTO ' ;
3233
3334 /**
34- * @var int: if upload type is AUTO, when file size big than 10M will choose block upload, else use rest api upload
35+ * @var int 上传的接口类型设置为 ` AUTO` 时,文件大小的边界值:小于该值时,使用 rest api,否则使用断点续传。 默认 30M
3536 */
36- public $ sizeBoundary = 10485760 ;
37+ public $ sizeBoundary = 31457280 ;
3738 /**
38- * @var int: max block size 5M
39+ * @var int 分块上传`Multi`接口的最大分块值
3940 */
4041 public $ maxBlockSize = 5242880 ;
4142
43+ /**
44+ * @var int 分块时,每个块的过期时间
45+ */
4246 public $ blockExpiration = 60 ;
4347
4448 /**
45- * @var int: request timeout seconds
49+ * @var int request timeout seconds
4650 */
4751 public $ timeout = 60 ;
48-
49-
50- public $ videoNotifyUrl ;
51-
52- public $ formReturnUrl ;
53- public $ formNotifyUrl ;
54-
52+
53+
54+ /**
55+ * @var string 异步云处理的回调通知地址
56+ */
57+ public $ processNotifyUrl ;
58+
5559 private $ version = '3.0.0 ' ;
5660
5761
5862
5963 /**
60- * @var string
64+ * @var string 表单 api 的秘钥
6165 */
6266 private $ formApiKey ;
6367
6468 /**
65- * @var string
69+ * @var string rest api 和 form api 的接口地址
6670 */
6771 static $ restApiEndPoint ;
6872
6973
7074 /**
71- * different route type, detail see http://docs.upyun.com/api/
75+ * rest api 和 form api 接口请求地址,详见: http://docs.upyun.com/api/rest_api /
7276 */
7377 const ED_AUTO = 'v0.api.upyun.com ' ;
7478 const ED_TELECOM = 'v1.api.upyun.com ' ;
7579 const ED_CNC = 'v2.api.upyun.com ' ;
7680 const ED_CTT = 'v3.api.upyun.com ' ;
7781
7882 /**
79- * multipart api endpoint
83+ * 分块上传接口请求地址
8084 */
8185 const ED_FORM = 'm0.api.upyun.com ' ;
8286
8387 /**
84- * media api endpoint
88+ * 异步云处理接口地址
8589 */
8690 const ED_VIDEO = 'p0.api.upyun.com ' ;
8791
8892 /**
89- * purge api endpoint
93+ * 刷新接口地址
9094 */
9195 const ED_PURGE = 'http://purge.upyun.com/purge/ ' ;
9296
@@ -113,8 +117,8 @@ public function getFormApiKey() {
113117 public function setFormApiKey ($ key ) {
114118 $ this ->formApiKey = $ key ;
115119 }
116-
120+
117121 public function getVersion () {
118- return $ this ->version ;
122+ return $ this ->version ;
119123 }
120124}
0 commit comments