My company recently moved from Coldfusion 9 to Coldfusion 11. One of the problems that I could not solve this migration with is how to make CFZIP work.
On the old server, we had a place in our application where we could upload zip files with images, and then Coldfusion unpacked them and placed them on the server.
<cffile action="UPLOAD" filefield="vchrZip"
destination="#app_sysfilepath_site#images\somefolder\zip\"
nameconflict="makeunique">
<cfset folder = Mid(file.serverfile, 1, Len(file.serverfile) - 4)>
<cfdirectory action="create" directory="#app_sysfilepath_site#images\somefolder\#folder#">
<cfzip action="unzip"
file="#app_sysfilepath_site#images\somefolder\zip\#file.serverfile#"
destination="#app_sysfilepath_site#images\somefolder\#folder#"
storepath="false">
In coldfusion 9, this will upload the image files to the root # app_sysfilepath_site # images \ somefolder # folder # "
#app_sysfilepath_site#images\somefolder\#folder#"
----> Image.png
----> Image2.png
----> Image3.png
In Coldfusion 11, this places a subfolder with the same name as the zip file with the images inside it.
#app_sysfilepath_site#images\somefolder\#folder#"
---->#folder#
----> Image.png
----> Image2.png
----> Image3.png
I tried to change the path to the repository to "no", but it did not work.
source
share