From 55f1d032892f155c0ad9611be5a91638f5202e96 Mon Sep 17 00:00:00 2001 From: welsir <1824379011@qq.com> Date: Sat, 23 Dec 2023 23:28:42 +0800 Subject: [PATCH] =?UTF-8?q?[DEV:=E6=96=87=E4=BB=B6=E6=9C=8D=E5=8A=A1]=20?= =?UTF-8?q?=E4=B8=8A=E7=BA=BF=E6=B5=8B=E8=AF=95=E6=9C=8D=E5=8A=A1=E5=99=A8?= =?UTF-8?q?1=20-e:test=20-m:file-service=20-type:single=20-v:1.4=20-?= =?UTF-8?q?rp:8089=20-de:<-e=20ACTIVE=3Ddev=20-e=20UNIQUE=5FID=3D0=20-e=20?= =?UTF-8?q?SERVER=5FPORT=3D8089>?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../filesystem/controller/OSSOperatorController.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/example/filesystem/controller/OSSOperatorController.java b/src/main/java/com/example/filesystem/controller/OSSOperatorController.java index adeb854..efe3d07 100644 --- a/src/main/java/com/example/filesystem/controller/OSSOperatorController.java +++ b/src/main/java/com/example/filesystem/controller/OSSOperatorController.java @@ -9,14 +9,12 @@ import com.example.filesystem.util.ConcurrentUtil; import org.apache.tomcat.jni.OS; import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; import javax.annotation.Resource; import java.util.ArrayList; +import java.util.Arrays; import java.util.Date; import java.util.List; import java.util.concurrent.Callable; @@ -53,10 +51,10 @@ public Result download(@Validated DownloadFileVO commonFileVO){ } @PostMapping("/upload/list") - public Result upload(MultipartFile[] files,String[] md5List,String[] pathList,String bucket){ + public Result upload(@RequestParam("file") MultipartFile[] files, String[] md5List, String[] pathList, String bucket){ ArrayList res = new ArrayList<>(); OSSFileVO ossFileVO = new OSSFileVO(); - logger.info("%s,%s,%s,%s",files,md5List,pathList,bucket); + logger.info("%s,%s,%s,%s",files, Arrays.toString(md5List), Arrays.toString(pathList),bucket); ossFileVO.setFile(files[0]); ossFileVO.setPath(pathList[0]); ossFileVO.setMd5(md5List[0]);