File upload o'reilly添加了额外的路径。为什么?
下面是我设置上传路径的代码:File upload o'reilly添加了额外的路径。为什么?,file-upload,multipartform-data,File Upload,Multipartform Data,下面是我设置上传路径的代码: FileManager fm = new FileManager(); String srcPath = fm.directoryPath("ownOIPath"); MultipartRequest multi = new MultipartRequest(req, srcPath, 50 *90000 * 90000, new com.oreilly.servlet.multipart.DefaultFileRenamePo
FileManager fm = new FileManager();
String srcPath = fm.directoryPath("ownOIPath");
MultipartRequest multi = new MultipartRequest(req, srcPath,
50 *90000 * 90000, new com.oreilly.servlet.multipart.DefaultFileRenamePolicy());
srcPath是从*.properties文件读取的
属性文件中提供的路径I为:
ownOIPath=/var/www/vhosts/globalsteelweb.com/httpdocs/UploadedFiles/ownOI/
我更改了此路径并在windows环境中设置,然后工作正常
但为什么要在linux服务器上添加/var/java/aache-tomcat-7.0.47/webapps/gsw extra呢
java.lang.IllegalArgumentException:不是目录:
/var/java/apache-tomcat-7.0.47/webapps/gsw/var/www/vhosts/domain.com/httpdocs/UploadedFiles/ownOI
请告知
致以最良好的祝愿我检查了所有的东西,但那真的很奇怪。在我在属性文件中写入的路径的末尾有一个空白。当我把它取下来的时候,一切都开始正常工作了