0
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 Java:1.8 操作系统:Win 2012 R2 Orcale Webcenter Sites 12C

4

1 回答 1

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() ,因为无论它是否是在内存或磁盘上

于 2018-09-21T05:17:45.407 回答