|
@@ -1,17 +1,11 @@
|
|
|
package com.sqx.modules.file;
|
|
package com.sqx.modules.file;
|
|
|
|
|
|
|
|
-import com.sqx.common.utils.Result;
|
|
|
|
|
import com.sqx.modules.file.service.NewFileService;
|
|
import com.sqx.modules.file.service.NewFileService;
|
|
|
-import icu.xuyijie.secureapi.annotation.DecryptParam;
|
|
|
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
|
-import io.swagger.annotations.ApiOperation;
|
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
|
|
-import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
-import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 阿里云文件上传
|
|
* 阿里云文件上传
|
|
@@ -27,11 +21,11 @@ public class AliFileUploadController {
|
|
|
|
|
|
|
|
private final NewFileService newFileService;
|
|
private final NewFileService newFileService;
|
|
|
|
|
|
|
|
- @RequestMapping(value = "/upload", method = RequestMethod.POST)
|
|
|
|
|
- @ApiOperation("文件上传")
|
|
|
|
|
- @ResponseBody
|
|
|
|
|
- public Result upload(@DecryptParam("file") MultipartFile file){
|
|
|
|
|
- String src = newFileService.upload(file);
|
|
|
|
|
- return Result.success().put("data",src);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // @RequestMapping(value = "/upload", method = RequestMethod.POST)
|
|
|
|
|
+ // @ApiOperation("文件上传")
|
|
|
|
|
+ // @ResponseBody
|
|
|
|
|
+ // public Result upload(@DecryptParam("file") MultipartFile file){
|
|
|
|
|
+ // String src = newFileService.upload(file);
|
|
|
|
|
+ // return Result.success().put("data",src);
|
|
|
|
|
+ // }
|
|
|
}
|
|
}
|