WANG 6 years ago
parent
commit
ff30e3db98

+ 5 - 5
examcloud-exchange-inner-api-provider/src/main/java/cn/com/qmth/examcloud/exchange/inner/api/controller/UpyunController.java

@@ -4,12 +4,11 @@ import java.io.IOException;
 
 import javax.servlet.ServletInputStream;
 import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
 
 import org.apache.poi.util.IOUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
@@ -38,9 +37,10 @@ public class UpyunController extends ControllerSupport {
 	AES aes = new AES();
 
 	@ApiOperation(value = "保存照片")
-	@PostMapping("put/{siteId}/{fileName}")
-	public String addFile(@PathVariable String siteId, @PathVariable String fileName,
-			HttpServletRequest req, HttpServletResponse resp) {
+	@PutMapping("put/{siteId}/{fileName}")
+	public String putFile(@PathVariable String siteId, @PathVariable String fileName,
+			HttpServletRequest req) {
+
 		User accessUser = getAccessUser();
 
 		String fileSuffix = fileName.substring(fileName.lastIndexOf("."));