stash
This commit is contained in:
parent
d606de8773
commit
2218cc3543
12 changed files with 393 additions and 2204 deletions
|
|
@ -14,7 +14,7 @@ class FileSerializer(serializers.Serializer):
|
|||
|
||||
def to_representation(self, instance):
|
||||
return {'id': instance.id, 'name': instance.file.url, 'size': instance.file.size,
|
||||
'mime_type': instance.mime_type}
|
||||
'mime_type': instance.mime_type, 'hash': instance.hash}
|
||||
|
||||
def create(self, validated_data):
|
||||
return File.objects.get_or_create(**validated_data)[0]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue