|
@@ -32,7 +32,6 @@ import cn.com.qmth.examcloud.commons.exception.ExamCloudRuntimeException;
|
|
import cn.com.qmth.examcloud.commons.exception.StatusException;
|
|
import cn.com.qmth.examcloud.commons.exception.StatusException;
|
|
import cn.com.qmth.examcloud.commons.logging.ExamCloudLog;
|
|
import cn.com.qmth.examcloud.commons.logging.ExamCloudLog;
|
|
import cn.com.qmth.examcloud.commons.logging.ExamCloudLogFactory;
|
|
import cn.com.qmth.examcloud.commons.logging.ExamCloudLogFactory;
|
|
-import cn.com.qmth.examcloud.web.bootstrap.PropertyHolder;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
* upyun SDK定制版
|
|
* upyun SDK定制版
|
|
@@ -78,8 +77,6 @@ public class UpYunClient {
|
|
|
|
|
|
private RequestConfig requestConfig;
|
|
private RequestConfig requestConfig;
|
|
|
|
|
|
- private String testUrl;
|
|
|
|
-
|
|
|
|
private String base64Auth = null;
|
|
private String base64Auth = null;
|
|
|
|
|
|
private boolean unsafe;
|
|
private boolean unsafe;
|
|
@@ -111,7 +108,6 @@ public class UpYunClient {
|
|
.encodeBase64String((userName + ":" + password).getBytes());
|
|
.encodeBase64String((userName + ":" + password).getBytes());
|
|
unsafe = false;
|
|
unsafe = false;
|
|
|
|
|
|
- testUrl = PropertyHolder.getString("$upyun.testUrl");
|
|
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -146,9 +142,6 @@ public class UpYunClient {
|
|
public UpYunPathInfo writeFile(String filePath, InputStream in) {
|
|
public UpYunPathInfo writeFile(String filePath, InputStream in) {
|
|
String path = formatPath(filePath);
|
|
String path = formatPath(filePath);
|
|
String url = "https://" + API_DOMAIN + path;
|
|
String url = "https://" + API_DOMAIN + path;
|
|
- if (filePath.endsWith(".test")) {
|
|
|
|
- url = testUrl;
|
|
|
|
- }
|
|
|
|
|
|
|
|
HttpPut httpPut = new HttpPut(url);
|
|
HttpPut httpPut = new HttpPut(url);
|
|
httpPut.setConfig(this.requestConfig);
|
|
httpPut.setConfig(this.requestConfig);
|
|
@@ -208,9 +201,6 @@ public class UpYunClient {
|
|
public void deleteFile(String filePath) {
|
|
public void deleteFile(String filePath) {
|
|
String path = formatPath(filePath);
|
|
String path = formatPath(filePath);
|
|
String url = "https://" + API_DOMAIN + path;
|
|
String url = "https://" + API_DOMAIN + path;
|
|
- if (filePath.endsWith(".test")) {
|
|
|
|
- url = testUrl;
|
|
|
|
- }
|
|
|
|
|
|
|
|
HttpDelete httpDelete = new HttpDelete(url);
|
|
HttpDelete httpDelete = new HttpDelete(url);
|
|
httpDelete.setConfig(this.requestConfig);
|
|
httpDelete.setConfig(this.requestConfig);
|