文件上传接口支持跨域
This commit is contained in:
parent
f20bc55e5f
commit
9088cc94f3
@ -7,10 +7,7 @@ import cn.axzo.oss.manager.api.dto.response.ServerFileUploadResponse;
|
||||
import cn.axzo.oss.service.api.FileService;
|
||||
import cn.azxo.framework.common.model.CommonResponse;
|
||||
import lombok.SneakyThrows;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@ -30,6 +27,7 @@ public class WebFileController {
|
||||
|
||||
@SneakyThrows
|
||||
@PostMapping("/v1/file")
|
||||
@CrossOrigin
|
||||
public CommonResponse<WebFileUploadVo> upload(@Valid @RequestParam String appCode,
|
||||
@Valid @RequestParam String bizScene,
|
||||
@Valid @RequestParam MultipartFile file) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user