B
Bigus
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
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