FileInputStream inStream = new FileInputStream(new
File(ics.GetCgi("resumeFileUpload").getFile()));
While executing the above line we have received below Exception
java.io.FileNotFoundException: file:\C:\Oracle\MIDDLE~1\ORACLE~1\USER_P~1\domains\MIASTA~1\servers\wcsites_server1\tmp\fwcs-tmp\temp795\dcs6083687448684979201.tmp (The filename, directory name, or volume label syntax is incorrect)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
请在下面找到环境详细信息 服务器:Weblogic 12.2.1.3.0 爪哇:1.8 操作系统:Win 2012 R2 Orcale网站中心网站12C
答案 0 :(得分:0)
// If you want the bytes
FTVAL bindata = ics.GetCgi("resumeFileUpload");
if (bindata != null) {
bytes = bindata.getBlob();
}
// if you want the InputStream
FTVAL bindata = ics.GetCgi("resumeFileUpload");
if (bindata != null) {
inputStream = bindata.getStream();
}
您可以尝试上述方法吗?
这与上传的文件是否超过最大文件上传大小有关(是否持久保存到磁盘)有关,因此获取InputStream的最安全方法是使用getStream(),因为无论该方法如何工作无论是在内存中还是在磁盘上