Skip to content

Instantly share code, notes, and snippets.

@why404
Created September 23, 2013 08:08
Show Gist options
  • Save why404/6667703 to your computer and use it in GitHub Desktop.
Save why404/6667703 to your computer and use it in GitHub Desktop.
String key = IO.UNDEFINED_KEY; // 自动生成key, 也可指定key名
PutExtra extra = new PutExtra();
extra.checkCrc = PutExtra.AUTO_CRC32; // 可选, 上传校验crc32值
extra.params.put("x:arg", "val"); // 可选, 自定义参数, callback时可传递给AppServer
IO.putFile(this, uploadToken, key, uri, extra, new JSONObjectRet() {
@Override
public void onSuccess(JSONObject resp) {
// ...
}
@Override
public void onFailure(Exception ex) {
// ...
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment