int dot = filename.lastIndexOf(‘.‘);
if ((dot > -1)
&& (dot < (licenceImg.getOriginalFilename().length()))) {
extension = licenceImg.getOriginalFilename().substring(dot + 1);
}
String fileName = System.nanoTime() + "."
+ extension;
时间: 2024-10-31 23:19:47