This commit is contained in:
zjt 2024-09-13 23:22:00 +08:00
parent b1e56a8b8a
commit 373b1e509f
1 changed files with 1 additions and 1 deletions

View File

@ -16,7 +16,7 @@ public class LoginController {
public String uploadcommit(MultipartFile file) {
//保存文件
File file1 = new File("D:/javaee/untitled/data");
//随机数 不重复 永远
//随机数不重复 永远
String filename = UUID.randomUUID().toString() +file.getOriginalFilename();
try {
file.transferTo(new File(file1, filename));