|
|
|
@ -49,6 +49,8 @@ public class UtilsController {
|
|
|
|
|
|
|
|
|
|
@Value("${web.uploadPath}")
|
|
|
|
|
private String path;
|
|
|
|
|
@Value("${web.cdn}")
|
|
|
|
|
private String cdn;
|
|
|
|
|
|
|
|
|
|
@Operation(summary = "上传")
|
|
|
|
|
@PostMapping("/upload")
|
|
|
|
@ -122,7 +124,7 @@ public class UtilsController {
|
|
|
|
|
res.replace("errno", 0);
|
|
|
|
|
JSONObject obj = new JSONObject();
|
|
|
|
|
obj.put("alt", fileName);
|
|
|
|
|
obj.put("url", "/upload/" + newFileName);
|
|
|
|
|
obj.put("url", cdn + "/upload/" + newFileName);
|
|
|
|
|
res.put("data", obj);
|
|
|
|
|
return res;
|
|
|
|
|
} catch (IOException e) {
|
|
|
|
|