Commit 0f252a3f by 阳浪

附件更新名字

parent 99d8d675
......@@ -47,7 +47,7 @@ public class FileUploadController {
String bucketName =propertiesUtil.getPublicParam().get("ossdir");;
String name = file.getOriginalFilename();
String[] fileNames = name.split("\\.");
name = fileNames[0] + DateFormatUtils.format(new Date(), "yyyyMMdd") + fileNames[1];
name = fileNames[0] + System.currentTimeMillis() + fileNames[1];
log.info("=============文件大小:{}===========",file.getSize());
minioTools.uplodFile(bucketName,name,file.getInputStream());
return Response.ok(pcHostUrl+"/api/v1/buckets/"+bucketName+"/objects/download/?preview=true&prefix="+name);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment