Skip to main content

django middleware for serving media files

Project description

# INSTALLATION

use pip to install package:
`pip install -e git+https://bitbucket.org/renlinx007/django-fileprovider.git@0.1a#egg=django-fileprovider`

* add `fileprovider` to django `INSTALLED_APPS` section.
* add `fileprovider.middleware.FileProviderMiddleware` to `MIDDLEWARE_CLASSES` section
* set django `settings` file with `FILEPROVIDER_NAME` any of available providers {'python', 'nginx', 'apache'}

# USAGE

on django views where file response is required, fill response header `X-File` with absolute file path
for example,

```python

def hello(request):
response = HttpResponse()
response['X-File'] = '/absolute/path/to/file'
return response
```

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-fileprovider-0.1a3.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_fileprovider-0.1a3-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file django-fileprovider-0.1a3.tar.gz.

File metadata

File hashes

Hashes for django-fileprovider-0.1a3.tar.gz
Algorithm Hash digest
SHA256 e9f92cb2d4a343c6fcc869fcd64790ba0fe13eaad06e81d2e234634037930408
MD5 3be0125f72ec6afed4586455e4acc770
BLAKE2b-256 2dea2f6ed0be2e383e83af3f1d3d1a646cd557c61875bd69fd35cb4d4c412864

See more details on using hashes here.

File details

Details for the file django_fileprovider-0.1a3-py3-none-any.whl.

File metadata

File hashes

Hashes for django_fileprovider-0.1a3-py3-none-any.whl
Algorithm Hash digest
SHA256 399868c7196acb649d6512e58ba4e47d257fbe09e894ea635db5b830cea311ed
MD5 7e3dfd8385e74b42b6dda57d6c8bd0ab
BLAKE2b-256 ab820c89b6ebede4e116e3378502c9de0ae80955148d22bb9501380de8060637

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page