Answered
Zip file uploaded by CF can't be unzipped by CF or Java
I'm having a WTF moment right now trying to track down this
problem. I am creating a monitoring tool for our merge email
system. What I would like to do is submit a job zip file through
our upload form, in which case I just need to upload a zip file
with cfhttp to the action page.
What I'm running into is a problem unzipping the file when it is on the server. However if I go to the server the received file opens fine with WinRAR or Windows Explorer. If I manually go to our form and upload the exact same file it works fine. Really odd. I can only find very basic information about uploading files with cfhttp and tried all of the attributes that seemed logical.
Attached is very basic example of the problem. It may end up being a bug in CF or something.
The code does the following
1. creates a text file
2. creates a zip file with the text file
3. tries to unzip the file to make sure it is fine
4. uploads the file (processed by a <cfelse> block at the bottom)
5. tries to unzip the file uploaded
The error occurs in step 5. CF just can't unzip the uploaded file, but I can unzip it using other tools.
================
What I'm running into is a problem unzipping the file when it is on the server. However if I go to the server the received file opens fine with WinRAR or Windows Explorer. If I manually go to our form and upload the exact same file it works fine. Really odd. I can only find very basic information about uploading files with cfhttp and tried all of the attributes that seemed logical.
Attached is very basic example of the problem. It may end up being a bug in CF or something.
The code does the following
1. creates a text file
2. creates a zip file with the text file
3. tries to unzip the file to make sure it is fine
4. uploads the file (processed by a <cfelse> block at the bottom)
5. tries to unzip the file uploaded
The error occurs in step 5. CF just can't unzip the uploaded file, but I can unzip it using other tools.
================
