|
|
@@ -8,7 +8,7 @@ import io.swagger.v3.oas.annotations.Operation;
|
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
-import org.springframework.web.bind.annotation.CrossOrigin;
|
|
|
+import org.apache.logging.log4j.util.Strings;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
@@ -29,11 +29,10 @@ public class FileController {
|
|
|
return ResultUtils.success(fileService.uploadImage(file,isPermanent));
|
|
|
}
|
|
|
|
|
|
- @CrossOrigin
|
|
|
@Operation(summary = "上传文件", description = "上传文件,上传后返回文件url")
|
|
|
@PostMapping("/file/upload")
|
|
|
public Result<String> uploadFile(@RequestParam("file") MultipartFile file) {
|
|
|
- return ResultUtils.success(fileService.uploadFile(file));
|
|
|
+ return ResultUtils.success(fileService.uploadFile(file), Strings.EMPTY);
|
|
|
}
|
|
|
|
|
|
}
|