mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-22 12:05:05 +08:00
图片上传
This commit is contained in:
@@ -163,10 +163,16 @@ public class CommonController {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传到阿里云oss
|
||||
* http://localhost:8080/common/uploadOSS
|
||||
* @param file
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@CrossOrigin
|
||||
@PostMapping("/uploadOSS")
|
||||
public AjaxResult uploadFileOSS(MultipartFile file) throws Exception {
|
||||
System.out.println(file);
|
||||
try {
|
||||
String url = AliyunOssUploadUtils.uploadFile(file);
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
|
||||
Reference in New Issue
Block a user