Old 12-12-2007, 10:35   #1 (permalink)
weldo
now with added beard
 
weldo's Avatar
 
Join Date: Mar 2004
Location: Liverpool
Posts: 5,549
application/force-download

i want a pdf link (from an email) to force a file download box - rather than auto opening it up in a browser window ...

the site runs in jsp ... (not sure if php is installed on the server)

anyone got any tips ??
__________________
fuck signatures
  Reply With Quote
Old 12-12-2007, 10:37   #2 (permalink)
datahound
Spare Parts
 
datahound's Avatar
 
Join Date: Jan 2005
Location: Bracknell Forest
Posts: 5,092
force download of pdf - Google Search

Have you trawled through this already?
__________________
  Reply With Quote
Old 12-12-2007, 10:39   #3 (permalink)
datahound
Spare Parts
 
datahound's Avatar
 
Join Date: Jan 2005
Location: Bracknell Forest
Posts: 5,092
Force download

That works in my browser. Is the fact you want to do it from email that is the issue.

(Thanks, that is a useful thing learned anyway.)
__________________
  Reply With Quote
Old 12-12-2007, 10:39   #4 (permalink)
weldo
now with added beard
 
weldo's Avatar
 
Join Date: Mar 2004
Location: Liverpool
Posts: 5,549
yeah ... of course !!

i'm sure the answers are all in there ... looks like some header info on the jsp page is needed ... just thought i'd throw it open here too ...
__________________
fuck signatures
  Reply With Quote
Old 12-12-2007, 10:42   #5 (permalink)
weldo
now with added beard
 
weldo's Avatar
 
Join Date: Mar 2004
Location: Liverpool
Posts: 5,549
Quote:
Originally Posted by datahound
Force download

That works in my browser. Is the fact you want to do it from email that is the issue.

(Thanks, that is a useful thing learned anyway.)

yeah that works - but how does it work ??
server side stuff ??
__________________
fuck signatures
  Reply With Quote
Old 12-12-2007, 10:49   #6 (permalink)
MikeMackay
Everything is fine.
 
MikeMackay's Avatar
 
Join Date: Feb 2005
Location: Witham & London
Posts: 900
Send a message via MSN to MikeMackay Send a message via Skype™ to MikeMackay
It's all contained in the Headers and Content-disposition that the server (and your script) sends to tell the browser to prompt the user with "Open/Save As..." instead of displaying in-line.

- Mike
  Reply With Quote
Old 12-12-2007, 10:53   #7 (permalink)
datahound
Spare Parts
 
datahound's Avatar
 
Join Date: Jan 2005
Location: Bracknell Forest
Posts: 5,092
Haha, I can't make it work either.
__________________
  Reply With Quote
Old 12-12-2007, 10:54   #8 (permalink)
weldo
now with added beard
 
weldo's Avatar
 
Join Date: Mar 2004
Location: Liverpool
Posts: 5,549
ta la ... yeah - i thought it was all to do with that ....

so, in order to track the volume of pdf downloads, i need to link to the .jsp file which has the header info in it ... prompting the download box ...

the number of pageloads = the number of downloads (or thereabouts)


cool.

ta
__________________
fuck signatures
  Reply With Quote
Old 12-12-2007, 10:55   #9 (permalink)
weldo
now with added beard
 
weldo's Avatar
 
Join Date: Mar 2004
Location: Liverpool
Posts: 5,549
Quote:
Originally Posted by datahound
Haha, I can't make it work either.
its server side magic !!

__________________
fuck signatures
  Reply With Quote
Old 12-12-2007, 10:59   #10 (permalink)
MikeMackay
Everything is fine.
 
MikeMackay's Avatar
 
Join Date: Feb 2005
Location: Witham & London
Posts: 900
Send a message via MSN to MikeMackay Send a message via Skype™ to MikeMackay
You may need to write yourself a small download script that counts downloads per PDF as well as sending the correct headers on to initiate the force download. Simply linking to the file itself will display it in-line, as you know.

If you need help give us a yell and I'll do what I can for you

- Mike
  Reply With Quote
Old 12-12-2007, 11:08   #11 (permalink)
weldo
now with added beard
 
weldo's Avatar
 
Join Date: Mar 2004
Location: Liverpool
Posts: 5,549
ah cheers mike ...

this one's for my 'proper job' where i'm surrounded by java developers - so i'm sure we can sort it out ourselves ... but thanks for the offer.
__________________
fuck signatures
  Reply With Quote
Old 12-12-2007, 11:14   #12 (permalink)
datahound
Spare Parts
 
datahound's Avatar
 
Join Date: Jan 2005
Location: Bracknell Forest
Posts: 5,092
Quote:
Originally Posted by weldo
its server side magic !!

Yuk, yuk, yuk!
__________________
  Reply With Quote
Old 12-12-2007, 11:23   #13 (permalink)
weldo
now with added beard
 
weldo's Avatar
 
Join Date: Mar 2004
Location: Liverpool
Posts: 5,549
jar, spoon ... spoon, jar
__________________
fuck signatures
  Reply With Quote
Old 12-12-2007, 16:11   #14 (permalink)
emil
dt immigrant
 
emil's Avatar
 
Join Date: Nov 2004
Location: Bucharest - Romania
Posts: 7,449
Send a message via ICQ to emil Send a message via MSN to emil Send a message via Yahoo to emil Send a message via Skype™ to emil
geeks
__________________
Q X R L
  Reply With Quote
Old 16-01-2008, 05:07   #15 (permalink)
Shiro
shiro
 
Shiro's Avatar
 
Join Date: Aug 2007
Location: Yokohama, Japan
Posts: 3,066
So was anybody ever able to get this to work? I want to do it now, but the one page that was linked to says "do this:" but doesn't actually say how to do it!
  Reply With Quote
Old 16-01-2008, 05:23   #16 (permalink)
Larixk
Senior Member
 
Larixk's Avatar
 
Join Date: Sep 2006
Location: Utrecht, Netherlands
Posts: 1,052
Send a message via MSN to Larixk
add "Content-Disposition: attachment" to your http-header
__________________
  Reply With Quote
Old 16-01-2008, 07:04   #17 (permalink)
weldo
now with added beard
 
weldo's Avatar
 
Join Date: Mar 2004
Location: Liverpool
Posts: 5,549
yeah - my colleague sorted it out here for me ...

its all in the header ...
__________________
fuck signatures
  Reply With Quote
Old 16-01-2008, 10:14   #18 (permalink)
Shiro
shiro
 
Shiro's Avatar
 
Join Date: Aug 2007
Location: Yokohama, Japan
Posts: 3,066
Thanks!
  Reply With Quote
Old 16-01-2008, 13:12   #19 (permalink)
website-design
Best design is simple :-)
 
Join Date: Jan 2008
Posts: 42
cool man! neat :-) ... seems you got it working.
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8