Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

File Download

0 views
Skip to first unread message

^MisterJingo^

unread,
Jul 29, 2006, 5:27:56 PM7/29/06
to
Hi all,

I've written some code which allows a user to browse a directory and
any subdirectories it contains. The page which contains this can only
be browsed by users with a certain cookie (the page checks for this
before allowing access).
To stop files being downloaded through a link to them on a server
(potentially allowing unauthorized people access) I've put the
directory containing the files outside of the web root.
This all works fine, but i'm unsure how to go about offering the files
for download to people logged in.
I know there mgiht be easier ways of doing this, but i've been told
that there should be no login page, as the users of this file browser
will be linked to it from different VLEs - so a cookie solution was
chosen as it will be seemless.
Any help or advice on how to go about this would be appreciated.

msnews.microsoft.com

unread,
Jul 29, 2006, 8:59:50 PM7/29/06
to
Create a page that checks the cookie, reads the requested file, sets the
MIME type to the file type and streams out the bytes.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
Think Outside the Box!
*************************************************
"^MisterJingo^" <miste...@gmail.com> wrote in message
news:1154194076.6...@m79g2000cwm.googlegroups.com...

0 new messages