|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
cfcontent question
Hi,
All I am trying to do is this using cfcontent <cfcontent type = "application/zip" file = " E:\Inetpub\staging\TestRoot\test.zip" deleteFile = "No"> When I hit the cfm page, I get a dialog box that "You have chosen to open test.cfm, which is a winzip file." Its trying to download a cfm file instead of a zip file Is it possible with a zip file? It works for other file types like .doc, .gif, .pdf, .txt, .html etc, when I use the appropriate "type" value in cfcontent Tx in advance. rig |
|
#2
|
|||
|
|||
|
Quote:
If you are downloading from a pc, use: <CFHEADER NAME="Content-Disposition" VALUE="attachment; filename=test.zip"> <CFCONTENT TYPE="application/zip" FILE=" E:\Inetpub\staging\TestRoot\test.zip" DELETEFILE="yes"> If you are downloading from a mac, then using <a href> will do it. CFCONTENT and Macs dont seem to work. Even Ben Forta couldnt answer this when I had a problem with cfcontent and macs. <A HREF=" E:\Inetpub\staging\TestRoot\test.zip">Download Zip File</A> Last edited by davegd : May 3rd, 2005 at 04:37 PM. Reason: stronger answer |
|
#3
|
|||
|
|||
|
Don't forget pathinfo...
It's a long time since I last dealt with it, but don't forget about CGI.PathInfo. It's most reliable - your a href points to:
http://www.example.com/test.cfm/test.zip and you just serve the zip file as you did before. This has a big advantage in that all browsers think it's just an ordinary zip file, but you can still use ColdFusion in the background. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > cfcontent question |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|