| 1 |
$Id: README.TXT,v 1.2.2.1 2006/03/26 15:08:08 elmuerte Exp $
|
| 2 |
|
| 3 |
Description
|
| 4 |
-----------
|
| 5 |
|
| 6 |
Drupal has an aweful way of handling file requests through the private method.
|
| 7 |
This module fixes that, it implements most of the HTTP features. Things like
|
| 8 |
caching and resuming are supported.
|
| 9 |
This module also as a anti-leech feature which should prevent stealing of files
|
| 10 |
on remote sites. So this module can also be an addition when using the public
|
| 11 |
method. The user will be redirected to the node to which the file was
|
| 12 |
associated. Currently the anti-leech only checks the referer to be within
|
| 13 |
the configured range. Empty referers are currently still allowed, but this
|
| 14 |
might change in a future release.
|
| 15 |
A special mode has been added for in case of images (only JPEG, PNG and GIF).
|
| 16 |
Either a watermark can be added or the image can be subsituted with an other
|
| 17 |
image. In case of watermarking the watermark images has to be a PNG, it's best
|
| 18 |
to make use of the PNG alpha channels for a nicer result.
|
| 19 |
|
| 20 |
Requirements
|
| 21 |
------------
|
| 22 |
|
| 23 |
This module requires Drupal 4.6 or a later version.
|
| 24 |
|
| 25 |
GD Lib is required for when using watermarking for images.
|
| 26 |
|
| 27 |
|
| 28 |
Installation
|
| 29 |
------------
|
| 30 |
|
| 31 |
The normal installation method applies.
|
| 32 |
|
| 33 |
In order to increase performance you can add the following lines to the
|
| 34 |
.htaccess file in Drupal's base directory. This only works when mod_rewrite
|
| 35 |
is installed.
|
| 36 |
|
| 37 |
# For public wrapping
|
| 38 |
RewriteCond %{REQUEST_FILENAME} -f
|
| 39 |
RewriteRule files/(.*)$ modules/filerequest/throttle.php?file=$1 [L]
|
| 40 |
|
| 41 |
# For private wrapping
|
| 42 |
RewriteRule system/files modules/filerequest/throttle.php [L]
|
| 43 |
|
| 44 |
This is very important, you need to place those lines before the following
|
| 45 |
block:
|
| 46 |
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
|
| 47 |
The best place is probably after RewriteBase line.
|
| 48 |
|
| 49 |
For this to work, you must create the file throttle.config.php in the module
|
| 50 |
directory, you can get the content for this file through the drupal administer
|
| 51 |
interface. Everytime you change the config in the administration interface
|
| 52 |
you will need to update the throttle.config.php file.
|
| 53 |
|
| 54 |
Note: if you had a filerequest module installed from before march 26, 2006
|
| 55 |
you will need to update the throttle.config.php if you were using this feature.
|
| 56 |
|
| 57 |
Configuration
|
| 58 |
-------------
|
| 59 |
|
| 60 |
filerequest can be configured at administer -> settings -> filerequest.
|
| 61 |
|
| 62 |
|
| 63 |
Authors
|
| 64 |
-------
|
| 65 |
|
| 66 |
* Michiel Hendriks <elmuerte@drunksnipers.com>
|
| 67 |
|