Menu

#24 Authenticated download module

open
nobody
None
5
2005-11-02
2005-11-02
tipichris
No

This Download Module is very similar to the Resources
Module supplied
with Exponent, but adds the ability to limit access to
files to
specified users.

Resources module provides links to the actual location
of the stored
files on the server, bypassing any Exponent
authentication. By contrast,
Download Module provides a new 'download' action which
makes use of
Exponent authentication and permissions routines to
determine if a
client has view/download permissions for the file
requested.

Following Exponent's usual file hierarchy, files are
stored in
files/downloadmodule. This directory is beneath the
webserver's
document root, so some method must be used to prevent
direct downloads
from it. Download module will attempt to place a
.htaccess file in the
directory containing the instruction

Deny from all

This will work ONLY if your server is Apache AND the
value of
AccessFileName is set to .htaccess in your httpd.conf
AND you have
suitable settings for AllowOverrides (either 'All' or
'Limit').

***********************************************************************
In all other cases you will need to manually take other
action to limit
access to this directory.
***********************************************************************

Permissions can be assigned to the whole module or to
individual files
uploaded to it. Permissions applied to the whole module
are inherited
by files within it.

Two configuration parameters are available:

Allow anyone to access files in this module?:
This parameter overrides view/download permissions
settings and allows
public access to files uploaded to the module.

Force a down load?
This parameter adds a "Content-Disposition: attachment;
filename=..."
header. Many browsers will respond by treating this as
a file to
download and save even if it is of a type that they can
display inline.

Discussion

  • mcruikshank

    mcruikshank - 2005-11-02

    Logged In: YES
    user_id=1368868

    Nice, thanks for the work on this. WIll try it out today.

     
  • tipichris

    tipichris - 2005-11-02

    Logged In: YES
    user_id=1224987

    New version 0.1.2 addresses a bug with deleting files

     
  • tipichris

    tipichris - 2005-11-02

    Download Manager 0.1.2

     

Log in to post a comment.