java - 使用springmvc上传图片报错already exists and could not deleted
PHP中文网
PHP中文网 2017-04-17 11:58:35
0
1
1365

使用springmvc上传图片报错,第二次上传同名文件会报图片already exists and could not deleted
File targetFile = new File(path, changName);
if(!targetFile.exists()){
targetFile.mkdirs();
}
file.transferTo(targetFile);

PHP中文网
PHP中文网

认证0级讲师

reply all(1)
小葫芦

It is recommended that you use MultipartHttpServletRequest to obtain attachment information

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!