@@ -47,26 +47,27 @@ public class PutPolicy {
47
47
48
48
public long deadline ;
49
49
50
- /**
51
- *
52
- * 对文件先进行一次变换操作(比如将音频统一转为某种码率的mp3)再进行存储。
53
- * transform的值就是一个fop指令,比如 "avthumb/mp3"。其含义是对上传的文件
54
- * 执行这个 fop 指令,然后把结果保存到七牛。最后保存的是经过处理过的文件,
55
- * 而不是用户上传的原始文件。
56
- **/
57
- public String transform ;
50
+ /**
51
+ *
52
+ * 对文件先进行一次变换操作(比如将音频统一转为某种码率的mp3)再进行存储。
53
+ * transform的值就是一个fop指令,比如 "avthumb/mp3"。其含义是对上传的文件
54
+ * 执行这个 fop 指令,然后把结果保存到七牛。最后保存的是经过处理过的文件,
55
+ * 而不是用户上传的原始文件。
56
+ *
57
+ **/
58
+ public String transform ;
58
59
59
- /**
60
- *
61
- * 单位: 秒
62
- * 文件变换操作执行的超时时间(单位:秒),上传和转码操作是同步进行的,
63
- * 先上传后转码,这个时间只是转码所需时间,不包括上传文件所需时间。
64
- * 这个值太小可能会导致误判(最终存储成功了但客户端得到超时的错误),
65
- * 但太大可能会导致服务端将其判断为低优先级任务。建议取一个相对准确的
66
- * 时间估计值*N(N不要超过5)。
67
- *
68
- **/
69
- public long fopTimeout ;
60
+ /**
61
+ *
62
+ * 单位: 秒
63
+ * 文件变换操作执行的超时时间(单位:秒),上传和转码操作是同步进行的,
64
+ * 先上传后转码,这个时间只是转码所需时间,不包括上传文件所需时间。
65
+ * 这个值太小可能会导致误判(最终存储成功了但客户端得到超时的错误),
66
+ * 但太大可能会导致服务端将其判断为低优先级任务。建议取一个相对准确的
67
+ * 时间估计值*N(N不要超过5)。
68
+ *
69
+ **/
70
+ public long fopTimeout ;
70
71
71
72
public PutPolicy (String scope ) {
72
73
this .scope = scope ;
@@ -112,12 +113,12 @@ public String marshal() throws JSONException {
112
113
if (this .persistentOps != null && this .persistentOps .length () > 0 ) {
113
114
stringer .key ("persistentOps" ).value (this .persistentOps );
114
115
}
115
- if (this .transform != null && this .transform .length () > 0 ) {
116
- stringer .key ("transform" ).value (this .transform );
117
- }
118
- if (this .fopTimeout > 0 ) {
119
- stringer .key ("fopTimeout" ).value (this .fopTimeout );
120
- }
116
+ if (this .transform != null && this .transform .length () > 0 ) {
117
+ stringer .key ("transform" ).value (this .transform );
118
+ }
119
+ if (this .fopTimeout > 0 ) {
120
+ stringer .key ("fopTimeout" ).value (this .fopTimeout );
121
+ }
121
122
stringer .key ("deadline" ).value (this .deadline );
122
123
stringer .endObject ();
123
124
0 commit comments