|
|
@@ -153,6 +153,24 @@ public class OssEndpoint {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * 小程序上传文件
|
|
|
+ *
|
|
|
+ * @param file 文件
|
|
|
+ * @return ObjectStat
|
|
|
+ */
|
|
|
+ @SneakyThrows
|
|
|
+ @PostMapping("/app_put-file")
|
|
|
+ public R<BladeFile> app_put(@RequestParam("file") MultipartFile file) {
|
|
|
+ BladeFile bladeFile = ossBuilder.template().putFile(file.getOriginalFilename(), file.getInputStream());
|
|
|
+ String link = bladeFile.getLink();
|
|
|
+ System.out.println("link======>"+link);
|
|
|
+ String replace = link.replace("http://121.37.83.47:9000/", "https://trade.re-king.cn/file/");
|
|
|
+ System.out.println("replace======>"+replace);
|
|
|
+ bladeFile.setLink(replace);
|
|
|
+ return R.data(bladeFile);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
* 上传文件
|
|
|
*
|
|
|
* @param file 文件
|