|
|
|
Your skill will accomplish what the force of many cannot |
|
| PerlMonks |
Sending non-html files to a browser through a scriptby michellem (Friar) |
| on Aug 15, 2001 at 13:39 UTC ( [id://105039]=perlquestion: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.michellem has asked for the wisdom of the Perl Monks concerning the following question:
Hi folks,
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: 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!
Back to
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||