|
@@ -164,7 +164,8 @@ public class UpYunClient {
|
|
String authorization = null;
|
|
String authorization = null;
|
|
try {
|
|
try {
|
|
md5 = null == md5 ? "" : md5;
|
|
md5 = null == md5 ? "" : md5;
|
|
- authorization = sign(userName, md5Password, METHOD_POST, path, date, policy, md5);
|
|
|
|
|
|
+ authorization = sign(userName, md5Password, METHOD_POST, SEPARATOR + this.bucketName,
|
|
|
|
+ date, policy, md5);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
throw new StatusException("100005", "[upyun]. fail to build sign", e);
|
|
throw new StatusException("100005", "[upyun]. fail to build sign", e);
|
|
}
|
|
}
|
|
@@ -174,12 +175,12 @@ public class UpYunClient {
|
|
|
|
|
|
String accessUrl = this.domain + filePath;
|
|
String accessUrl = this.domain + filePath;
|
|
|
|
|
|
- UpYunHttpRequest sign = new UpYunHttpRequest();
|
|
|
|
- sign.setAccessUrl(accessUrl);
|
|
|
|
- sign.setFormParams(params);
|
|
|
|
- sign.setFormUrl(formUrl);
|
|
|
|
|
|
+ UpYunHttpRequest request = new UpYunHttpRequest();
|
|
|
|
+ request.setAccessUrl(accessUrl);
|
|
|
|
+ request.setFormParams(params);
|
|
|
|
+ request.setFormUrl(formUrl);
|
|
|
|
|
|
- return sign;
|
|
|
|
|
|
+ return request;
|
|
}
|
|
}
|
|
|
|
|
|
public UpYunPathInfo writeFile(String filePath, File file) {
|
|
public UpYunPathInfo writeFile(String filePath, File file) {
|