Drf Fileupload Api 1.0.1 | Coderz Repository

drf-fileupload-api 1.0.1

Last updated:

0 purchases

drf-fileupload-api 1.0.1 Image
drf-fileupload-api 1.0.1 Images

Free

Languages

Categories

Add to Cart

Description:

drffileuploadapi 1.0.1

A file upload application for DjangoRestFramework
Installation
python3 -m pip install drf-fileupload-api

Usage

edit project/settings.py

INSTALL_APPS += [
'drf_fileupload',
]

MEDIA_ROOT = 'data/' # default: /

FILE_UPLOAD_TO = 'upload/%Y/%m/%d' # support strftime format, default: MEDIA_ROOT
FILE_UPLOAD_MAX_SIZE = '10M' # limit max file size, default: None


edit project/urls.py

from django.conf import settings
from django.conf.urls.static import static

urlpatterns = [
path('api/admin/', admin.site.urls),
path('api/fileupload/', include('drf_fileupload.urls')),
]

urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

API

Demo
git clone https://github.com/suqingdong/drf_fileupload

cd demo

python3 -m pip install -r requirements.txt

python3 manage.py makemigrations

python3 manage.py migrate

python3 manage.py createsuperuser

python3 manage.py runserver

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product: (if this is empty don't purchase this product)

Customer Reviews

There are no reviews.