WANG 6 jaren geleden
bovenliggende
commit
41dcef1dbe

+ 0 - 10
examcloud-exchange-inner-service/src/main/java/cn/com/qmth/examcloud/exchange/inner/service/upyun/UpYunClient.java

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