File downloads

From: Bigus (someone_at_somewhere.com)
Date: 02/25/04


Date: Wed, 25 Feb 2004 16:40:22 -0000

I have a directory outside of my web root on the web server and I have a
Perl script that presents a listing of the files in that directory to the
user, providing they have authenticated properly. I want the user to be able
to click on a filename and download the file as though it was in a web
directory.
I figure I might be able to do this by reading the file and then sending it
to the users browser with the print command, ie: printing the appropriate
content-type followed by the file data, but I don't know how I would deal
with the different types of file. Is there a generic content-type that I
could use for all files that would simply case the user's browser to present
them with a save dialog and they could then download it, or is there some
better way of doing all this?

Bigus



Relevant Pages

  • RE: List of Hotfixes to fix DX10/SLI/GPU/Memory in Gaming
    ... The two Hotfixes that start with tinyurl have been hijavked to some foreign ... This is just a comprehensive listing of MS Hotfixes that should be ... Vista gaming/graphics/memory problems many have been complaining of. ... The following take you directly to the TechNET Download Site and there ...
    (microsoft.public.windows.vista.games)
  • Re: download HP recordnow??
    ... > How do I download record now? ... When you said that you deleted Record now did you mean that you uninstalled ... it or perhaps you only deleted the shortcut icon or the listing in all ... did this for a friend and it is the same as a repair install your data and ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Found website that can read my hard drive - How??
    ... The scary thing is I did not download an ActiveX control or ... >> was a listing of the files and folder on my C: ... > Kind of like the "vicious new computer virus ... Its a good way to scare the billions ...
    (comp.security.misc)
  • Re: I thought ... oou big mistake
    ... > create a web page listing the mp3 and they would play when clicked. ... They try to download. ...
    (alt.linux)
  • Re: Found website that can read my hard drive - How??
    ... > let people know about a website that is able to provide a listing of my ... The scary thing is I did not download an ActiveX control or ... > was a listing of the files and folder on my C: ... Kind of like the "vicious new computer virus ...
    (comp.security.misc)