Skip to content

Commit 01bd281

Browse files
Merge branch 'main' into dev
2 parents 9c7f91a + 37dbfeb commit 01bd281

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

README.md

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Django Chunk File Upload is an alternative utility that helps you easily edit Django's chunked, drag and drop file uploads.
44

5-
<img src="https://i.ibb.co/9y2SgmS/f-P5-Or-Gkxk0-Ynj00ct-G.webp" alt="f-P5-Or-Gkxk0-Ynj00ct-G">
5+
<img src="https://i.ibb.co/9y2SgmS/f-P5-Or-Gkxk0-Ynj00ct-G.webp" alt="f-P5-Or-Gkxk0-Ynj00ct-G" border="0">
66

77
Features
88
----------
@@ -88,14 +88,14 @@ models.py
8888

8989
```python
9090
from django.db import models
91-
from django_chunk_file_upload.models import FileManagerMixin
91+
from django_chunk_file_upload.models import FileManager
9292

9393

9494
class Tag(models.Model):
9595
name = models.CharField(max_length=255)
9696

9797

98-
class YourModel(FileManagerMixin):
98+
class YourModel(FileManager):
9999
tags = models.ManyToManyField(Tag)
100100
custom_field = models.CharField(max_length=255)
101101

@@ -116,7 +116,6 @@ class YourForm(ChunkedUploadFileForm):
116116

117117
views.py
118118

119-
Accepted methods: GET, POST, DELETE (UPDATE, PUT does not work with FormData).
120119
```python
121120
from django_chunk_file_upload.views import ChunkedUploadView
122121
from django_chunk_file_upload.typed import File
@@ -127,18 +126,12 @@ from .forms import YourForm
127126
class CustomChunkedUploadView(ChunkedUploadView):
128127
form_class = YourForm
129128
permission_classes = (IsAuthenticated,)
130-
131129
# file_class = File # file class
132-
# file_status = app_settings.status # default: PENDING (Used when using background task, you can change it to COMPLETED.)
133130
# optimize = True # default: True
134131
# remove_file_on_update = True # update image on admin page.
135132
# chunk_size = 1024 * 1024 * 2 # custom chunk size upload (default: 2MB).
136133
# upload_to = "custom_folder/%Y/%m/%d" # custom upload folder.
137134
# template_name = "custom_template.html" # custom template
138-
139-
# # Run background task like celery when upload is complete
140-
# def background_task(self, instance):
141-
# pass
142135
```
143136

144137
custom_template.html

0 commit comments

Comments
 (0)