|
@@ -6,6 +6,7 @@ import java.util.Map;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.ModelAttribute;
|
|
import org.springframework.web.bind.annotation.ModelAttribute;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
@@ -13,7 +14,9 @@ import org.springframework.web.multipart.MultipartFile;
|
|
import cn.com.qmth.examcloud.commons.exception.StatusException;
|
|
import cn.com.qmth.examcloud.commons.exception.StatusException;
|
|
import cn.com.qmth.examcloud.commons.util.AES;
|
|
import cn.com.qmth.examcloud.commons.util.AES;
|
|
import cn.com.qmth.examcloud.exchange.inner.api.UpyunCloudService;
|
|
import cn.com.qmth.examcloud.exchange.inner.api.UpyunCloudService;
|
|
|
|
+import cn.com.qmth.examcloud.exchange.inner.api.request.DeleteFileReq;
|
|
import cn.com.qmth.examcloud.exchange.inner.api.request.PutFileReq;
|
|
import cn.com.qmth.examcloud.exchange.inner.api.request.PutFileReq;
|
|
|
|
+import cn.com.qmth.examcloud.exchange.inner.api.response.DeleteFileResp;
|
|
import cn.com.qmth.examcloud.exchange.inner.api.response.PutFileResp;
|
|
import cn.com.qmth.examcloud.exchange.inner.api.response.PutFileResp;
|
|
import cn.com.qmth.examcloud.exchange.inner.service.UpyunService;
|
|
import cn.com.qmth.examcloud.exchange.inner.service.UpyunService;
|
|
import cn.com.qmth.examcloud.exchange.inner.service.bean.UpyunPathEnvironmentInfo;
|
|
import cn.com.qmth.examcloud.exchange.inner.service.bean.UpyunPathEnvironmentInfo;
|
|
@@ -73,4 +76,15 @@ public class UpyunCloudServiceProvider extends ControllerSupport implements Upyu
|
|
return resp;
|
|
return resp;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @PostMapping("deleteFile")
|
|
|
|
+ @Override
|
|
|
|
+ public DeleteFileResp deleteFile(@RequestBody DeleteFileReq req) {
|
|
|
|
+ String siteId = req.getSiteId();
|
|
|
|
+ String filePath = req.getFilePath();
|
|
|
|
+ upyunService.delete(siteId, filePath);
|
|
|
|
+
|
|
|
|
+ DeleteFileResp resp = new DeleteFileResp();
|
|
|
|
+ return resp;
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|