2

我正在尝试使用 cfzip 压缩目录但没有成功。新创建的目录包含 PDF。编码:

<cfset tempDir  = getTempDirectory() />
<cfset userDirName = CreateUUID() />
<cfset userTempDir = #tempDir# & #userDirName# />

<cfloop query="data">
  Create PDFs...[cfdocument]
<cffile action="write" file="#userTempDir#\#name#.pdf" output="#pdf_output#" addnewline="no" nameconflict="makeunique" />
</cfloop>             

<cfzip action="zip" source="#userTempDir#" file="#tempDir#/testZIP.zip" recurse="yes" />

一切都执行得很好,但 cfzip。当 cfzip 行尝试执行以下错误时:

The page you were executing caused an internal server error
Request /applications/useritems/resources-cors/cfScripts/Print/Print.cfc
File Trace  E:/Tomcat/webapps/openbd/applications/useritems/resources-cors/cfScripts/Print/Print.cfc

Type    Internal
Tag Context CFZIP (E:/Tomcat/webapps/openbd/applications/useritems/resources-cors/cfScripts/Print/Print.cfc, Line=1018, Column=13)
|
+-- CFIF (E:/Tomcat/webapps/openbd/applications/useritems/resources-cors/cfScripts/Print/Print.cfc, Line=818, Column=9)
    |
    +-- CFFUNCTION (E:/Tomcat/webapps/openbd/applications/useritems/resources-cors/cfScripts/Print/Print.cfc, Line=814, Column=5)
Stack Trace 

java.lang.NullPointerException
    at com.naryx.tagfusion.expression.function.file.Zip.execute(Unknown Source)
    at com.naryx.tagfusion.cfm.tag.io.cfZIP.createZip(Unknown Source)
    at com.naryx.tagfusion.cfm.tag.io.cfZIP.realRender(Unknown Source)
    at com.naryx.tagfusion.cfm.tag.io.cfZIP.render(Unknown Source)  

我在这里想念什么?

4

0 回答 0