File fileSourcePath = new File("resources/upload/");
File fileSource = new File(fileSourcePath, mulFileSource.getOriginalFilename());
if (!fileSourcePath.exists()) {
fileSourcePath.mkdirs();
}
// 将接收得图片暂存到临时文件中
mulFileSource.transferTo(fileSource);
我想把上传的文件保存在upload文件夹中,怎么写路径。这样写会报java.io.FileNotFoundException
错误
What the hell is the picture you uploaded?
If you run it in eclipse, it should be a relative path with the project directory as the root, such as src/main/resources/upload/