Skip to main content

File Manager Application for DjangoRestFramework

Project description

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

  1. Add drf_file_manager to your INSTALLED_APPS setting:
# settings.py
INSTALLED_APPS += [
    'rest_framework',
    'drf_file_manager',
]
  1. Configuration for drf_file_manager:
# settings.py
FILE_UPLOAD_TO = 'data/upload/'
FILE_UPLOAD_MAX_SIZE = '10M'    # [optional]
  1. Add drf_file_manager.urls to your project's urls.py:
# urls.py

urlpatterns += [
    include('api/file/', include('drf_file_manager.urls')),
]

API Endpoints

  • POST /api/file/ - Upload a file
  • GET /api/file/ - List all files
  • GET /api/file/{id}/ - Retrieve a file
  • GET /api/file/{id}/download/ - Download a file (with streaming support)
  • DELETE /api/file/{id}/ - Delete a file
  • POST /api/file/clean/ - Delete all files

preview

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

drf_file_manager-1.0.0.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

drf_file_manager-1.0.0-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file drf_file_manager-1.0.0.tar.gz.

File metadata

  • Download URL: drf_file_manager-1.0.0.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.8

File hashes

Hashes for drf_file_manager-1.0.0.tar.gz
Algorithm Hash digest
SHA256 4cc5f1bf7a71d219c9975c1a3a074733cf912681eddc195a6d53d0c0c75a0215
MD5 c8dd832842c8bf78d477e380f1fbec66
BLAKE2b-256 0b70cbea5189c795194495a4446be33d64393c69e627d4d34f8d06ba6b962296

See more details on using hashes here.

File details

Details for the file drf_file_manager-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for drf_file_manager-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 245350cfa6eb8b6235b4433d444bd26b18e4426b7fdbbcb4aa7c71777b382770
MD5 13fd3a1aa96031915875dff0db12b883
BLAKE2b-256 12cb7da56ca7328305e3bce91ad814021cbb50e8aa1bd9fd511d2178c7961957

See more details on using hashes here.

Supported by

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