_____  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Clarke Bishop
Sent: 05/01/2008 11:02 AM
To: discussion@acfug.org
Subject: [ACFUG Discuss] Best way to download a PDF file


I have a 2 MB PDF that I get's downloaded via a CFM page so that I can do
some tracking of who downloads the page.
 
It seems there are two ways to make this work:
 
#1
<cfcontent type="application/pdf" file="myFile.pdf" reset="yes">
 
Normally, this would just open the PDF in the browser. 
 
 - OR - 
 
#2
<cfheader name="Content-Disposition" value="attachment;
filename=myFile.pdf">
<cfcontent type="application/pdf" file="myFile.pdf" reset="yes">
 
This prompts the user whether they want to save or open the document. 
 
Here are my questions:
 
1. My client thought that some users would not know how to click the save
icon in the Adobe Reader plug-in to save the PDF to their local drive. So,
option 2 would be better as it give them the choice. But, my users are
coming to the page from a link in an email and option 2 leaves open a blank
web browser after the open/save dialog. This might be confusing, too. Is
there another option that will work better? Can I download the page and then
redirect them to a download complete page? Or, maybe I should send them to a
landing page from the e-mail link and then let them download from there?
 
2. With either option, sometimes the file fails to fully download, and the
PDF displays with an error message:
 "There was an error opening this document. The file is damaged and could
not be repaired"
 
I added  <cfsetting requestTimeOut="600"> To try and prevent this problem.
But, somewhere I saw that the requestTimeOut doesn't apply to CFContent, so
I'm not sure this really helps. 
 
The problem was hard to duplicate since it seems to be bandwidth-dependent.
So, I turned on throttling in Charles, and selected a 56K modem to force low
bandwidth. It seems to download consistently for about 2 minutes (About 25%
of the 2MB file), and then just hangs for about 4.5 minutes and produces the
error. I removed the <cfsetting> tag and got essentially the same behavior
-- It goes for 2 minutes, then hangs for 
 
Once I deploy this, I expect thousands of downloads, and I don't want to
have to handle a bunch of support calls. 
 
Any ideas on how to best handle the user interface and prevent this download
timeout would be very much appreciated.
 
     Clarke
 
 

------------------------------------------------------------- 
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform 

For more info, see http://www.acfug.org/mailinglists 
Archive @ http://www.mail-archive.com/discussion%40acfug.org/ 
List hosted by FusionLink <http://www.fusionlink.com>  
------------------------------------------------------------- 



-------------------------------------------------------------
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------

Reply via email to