mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-25 18:44:23 +00:00
django2.2: fix breaking change for getting uploaded files size
This commit is contained in:
parent
cf3f5ea60c
commit
d7075eb762
@ -109,7 +109,7 @@ class AddFilesForm(forms.Form):
|
|||||||
owner=owner,
|
owner=owner,
|
||||||
is_folder=False,
|
is_folder=False,
|
||||||
mime_type=f.content_type,
|
mime_type=f.content_type,
|
||||||
size=f._size,
|
size=f.size,
|
||||||
)
|
)
|
||||||
try:
|
try:
|
||||||
new_file.clean()
|
new_file.clean()
|
||||||
|
@ -302,7 +302,7 @@ class UserProfileForm(forms.ModelForm):
|
|||||||
owner=self.instance,
|
owner=self.instance,
|
||||||
is_folder=False,
|
is_folder=False,
|
||||||
mime_type=f.content_type,
|
mime_type=f.content_type,
|
||||||
size=f._size,
|
size=f.size,
|
||||||
moderator=self.instance,
|
moderator=self.instance,
|
||||||
is_moderated=True,
|
is_moderated=True,
|
||||||
)
|
)
|
||||||
|
@ -630,7 +630,7 @@ class UserUploadProfilePictView(CanEditMixin, DetailView):
|
|||||||
owner=self.object,
|
owner=self.object,
|
||||||
is_folder=False,
|
is_folder=False,
|
||||||
mime_type=f.content_type,
|
mime_type=f.content_type,
|
||||||
size=f._size,
|
size=f.size,
|
||||||
)
|
)
|
||||||
new_file.file.name = name
|
new_file.file.name = name
|
||||||
new_file.save()
|
new_file.save()
|
||||||
|
@ -78,7 +78,7 @@ class SASForm(forms.Form):
|
|||||||
file=f,
|
file=f,
|
||||||
owner=owner,
|
owner=owner,
|
||||||
mime_type=f.content_type,
|
mime_type=f.content_type,
|
||||||
size=f._size,
|
size=f.size,
|
||||||
is_folder=False,
|
is_folder=False,
|
||||||
is_moderated=automodere,
|
is_moderated=automodere,
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user