File Manager Application for DjangoRestFramework
Installation
python3 -m pip install -U drf_file_manager
Windows needs install extra: python-magic-bin
python3 -m pip install python-magic-bin
Usage
- Add
drf_file_managerto yourINSTALLED_APPSsetting:
# settings.py
INSTALLED_APPS += [
'rest_framework',
'drf_file_manager',
]
- Configuration for
drf_file_manager:
# settings.py
FILE_UPLOAD_TO = 'data/upload/'
FILE_UPLOAD_MAX_SIZE = '10M' # [optional]
- Add
drf_file_manager.urlsto your project's urls.py:
# urls.py
urlpatterns += [
include('api/file/', include('drf_file_manager.urls')),
]
API Endpoints
POST /api/file/- Upload a fileGET /api/file/- List all filesGET /api/file/{id}/- Retrieve a fileGET /api/file/{id}/download/- Download a file (with streaming support)DELETE /api/file/{id}/- Delete a filePOST /api/file/clean/- Delete all files
preview
Metadata
Release files for drf-file-manager 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| drf_file_manager-1.0.0.tar.gz | 6.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| drf_file_manager-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.9 kB
Release files / drf_file_manager-1.0.0.tar.gz
| Download URL | drf_file_manager-1.0.0.tar.gz |
|---|---|
| Size | 6.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4cc5f1bf7a71d219c9975c1a3a074733cf912681eddc195a6d53d0c0c75a0215
|
|
BLAKE2b-256 checksum How to use checksums |
0b70cbea5189c795194495a4446be33d64393c69e627d4d34f8d06ba6b962296
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.8
|
Release files / drf_file_manager-1.0.0-py3-none-any.whl
| Download URL | drf_file_manager-1.0.0-py3-none-any.whl |
|---|---|
| Size | 7.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
245350cfa6eb8b6235b4433d444bd26b18e4426b7fdbbcb4aa7c71777b382770
|
|
BLAKE2b-256 checksum How to use checksums |
12cb7da56ca7328305e3bce91ad814021cbb50e8aa1bd9fd511d2178c7961957
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.8
|