表单提交

This commit is contained in:
hzj
2024-05-13 14:55:33 +08:00
parent d814600c85
commit 14fe1a7537
28 changed files with 1679 additions and 35 deletions

View File

@@ -11,9 +11,25 @@ import java.io.Serializable;
@AllArgsConstructor
public class FileVO implements Serializable {
//全名 路径+文件名
private String name;
//文件名
private String fileName;
private String url;
public FileVO( String name,String url){
this.name = name;
this.fileName = getFileName(name);
this.url = url;
}
public static String getFileName(String filePath) {
int index = filePath.lastIndexOf("/");
if (index == -1) {
return filePath; // 如果没有/,则返回整个路径
} else {
return filePath.substring(index + 1); // 截取最后一个/后面的部分作为文件名
}
}
}