michellem has asked for the wisdom of the Perl Monks concerning the following question:
This is probably in the realm of the dumb question, but here goes:
I wrote this content management system for a client, who needs all of their files protected (it's basically a restricted extranet). Originally all of the files were protected via apache's .htaccess protocol. Now, I've got a perl based login, and protection via a cookie that I've set, and read when the script is called. Most of the content is generated on the fly by the system with information in a back-end database. However, there are several kinds of files that I want to be able to show/give people access to, that are stumping me.
So these are the scenarios:
1) Regular content - deliverd up via script after cookie check.
2) Flat file html - delivered up via script, gotten from abolute path on the back-end (in an administratively protected area) - read through line by line and printed to the browser.
The ones that I don't know how to do: Images and pdf files, and any other binary file types. I can't send a URL out, because then the user would have to get into the administrative area - which they don't have a password for. How do I send a binary file to the browser from within a script?
Thanks!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Sending non-html files to a browser through a script
by trantor (Chaplain) on Aug 15, 2001 at 18:03 UTC | |
|
Re: Sending non-html files to a browser through a script
by TheoPetersen (Priest) on Aug 15, 2001 at 17:55 UTC | |
|
Re: Sending non-html files to a browser through a script
by tachyon (Chancellor) on Aug 15, 2001 at 18:07 UTC |