Skip to content

remove transform api #114

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 30, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 4 additions & 31 deletions src/main/java/com/qiniu/api/rs/PutPolicy.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,38 +41,17 @@ public class PutPolicy {
public int detectMime;
/** 可选 */
public long fsizeLimit;
/**限定用户上传的文件类型
/**限定用户上传的文件类型
* 可选
* */
public String mimeLimit;
/** 可选 */
public String persistentNotifyUrl;
/** 可选 */
public String persistentOps;

private long deadline;

/**
*
* 对文件先进行一次变换操作(比如将音频统一转为某种码率的mp3)再进行存储。
* transform的值就是一个fop指令,比如 "avthumb/mp3"。其含义是对上传的文件
* 执行这个 fop 指令,然后把结果保存到七牛。最后保存的是经过处理过的文件,
* 而不是用户上传的原始文件。
*
**/
public String transform;
private long deadline;

/**
*
* 单位: 秒
* 文件变换操作执行的超时时间(单位:秒),上传和转码操作是同步进行的,
* 先上传后转码,这个时间只是转码所需时间,不包括上传文件所需时间。
* 这个值太小可能会导致误判(最终存储成功了但客户端得到超时的错误),
* 但太大可能会导致服务端将其判断为低优先级任务。建议取一个相对准确的
* 时间估计值*N(N不要超过5)。
*
**/
public long fopTimeout;

public PutPolicy(String scope) {
this.scope = scope;
Expand Down Expand Up @@ -121,27 +100,21 @@ public String marshal() throws JSONException {
if (this.persistentOps != null && this.persistentOps.length() > 0) {
stringer.key("persistentOps").value(this.persistentOps);
}
if (this.transform != null && this.transform.length() > 0) {
stringer.key("transform").value(this.transform);
}
if (this.fopTimeout > 0) {
stringer.key("fopTimeout").value(this.fopTimeout);
}
stringer.key("deadline").value(this.deadline);
stringer.endObject();

return stringer.toString();
}


/**
* makes an upload token.
* @param mac
* @return
* @throws AuthException
* @throws JSONException
*/

public String token(Mac mac) throws AuthException, JSONException {
if (this.expires == 0) {
this.expires = 3600; // 3600s, default.
Expand Down
83 changes: 0 additions & 83 deletions src/test/java/com/qiniu/testing/TransformTest.java

This file was deleted.