File downloads
From: Bigus (someone_at_somewhere.com)
Date: 02/25/04
- Next message: Prad: "Getting read timeout error while fetching URL thru LWP"
- Previous message: Bill Smith: "Re: Perl CGI.pm script executing differently on different systems"
- Next in thread: Brian McCauley: "Re: File downloads"
- Reply: Brian McCauley: "Re: File downloads"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Next message: Prad: "Getting read timeout error while fetching URL thru LWP"
- Previous message: Bill Smith: "Re: Perl CGI.pm script executing differently on different systems"
- Next in thread: Brian McCauley: "Re: File downloads"
- Reply: Brian McCauley: "Re: File downloads"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|