uploadManager = new UploadManager(config);
String tokens = token <已经是服务器获取的token >
String data = imageTempPath;
String key = "image_100.png";
uploadManager.put(data, key, tokens,
new UpCompletionHandler() {
@Override
public void complete(String key, ResponseInfo info, JSONObject res) {
if (info.isOK()) {
sendUpWeStoreLoadBg(key);
} else {
Toast.makeText(MicroStoreMainActivity.this, "上传失败", Toast.LENGTH_SHORT).show();
}
}
}, null);
}
First, the name of your key is not good. It is recommended not to use this form.
Second, the specific reason should be on the server side. It may store the Hash of the image. If the same image is detected, you will be rejected. Uploaded again to save traffic