Zubrag.com
February 03, 2012, 09:07:03 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Download unprotected files  (Read 3349 times)
Eddy_P
Chief Researcher - PPHC Study Group (Australia)
Newbie
*
Posts: 23



WWW
« on: June 05, 2007, 12:47:07 am »

On one of my pages in html, sometimes the normal link <a href="booktitle.pdf">Book Title</a> does not work.

I could ask people to right click, then 'save as' or 'save target as' - but this might confuse them.

What part of the secure download script should (could ?) I utilize to have the "Save" Box appear when the above link is clicked upon so the file has to be saved before it is opened ?

Thanks,
E.P.

Logged

Evidence of TIME TRAVEL presented and examined WORLD BREAKING DISCOVERIES
zubrag
Administrator
Hero Member
*****
Posts: 744


WWW
« Reply #1 on: June 05, 2007, 06:58:40 am »

You could use this downloader

It has allowed extensions list. Here is what should force save dialog for pdf.

$allowed_ext = array (
  'pdf' => 'application/octet-stream'
);
Logged
Eddy_P
Chief Researcher - PPHC Study Group (Australia)
Newbie
*
Posts: 23



WWW
« Reply #2 on: June 05, 2007, 06:02:37 pm »

Do I need the whole script just to make the 'save box' appear, or can it be modified ?

The pdf files do not need to be in a secure directory, nor the URL address hidden.
Logged

Evidence of TIME TRAVEL presented and examined WORLD BREAKING DISCOVERIES
zubrag
Administrator
Hero Member
*****
Posts: 744


WWW
« Reply #3 on: June 07, 2007, 10:32:11 am »

Yes, whole script. But some browsers will still try to open pdf instead of saving it to disk. It depends on how browser is set up.

I believe Apache server can also be tuned to force save dialog for pdf (need mod_rewrite module). But i have no such experience.
Logged
recoding
Global Moderator
Jr. Member
*****
Posts: 71


WWW
« Reply #4 on: June 18, 2007, 06:33:56 am »

It can be browser specific, e.g. here at college if i view a file on the shared area in Firefox, it kindly downloads it for me, if i view in IE, it views it as a webpage [pointless].
But it can be [as zubrag said] server specific, so the server gets the browser to download it not try and view [trick the browser into thinking its just a txt file it cant view]
Logged

Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC