diff --git a/files/views.py b/files/views.py index 19505a0d..ea24c9bb 100644 --- a/files/views.py +++ b/files/views.py @@ -598,14 +598,15 @@ def put(self, request, friendly_token, format=None): media = self.get_object(friendly_token) if isinstance(media, Response): return media - serializer = MediaSerializer(media, data=request.data, context={"request": request}) if serializer.is_valid(): - if request.data.get('media_file'): - media_file = request.data["media_file"] - serializer.save(user=request.user, media_file=media_file) - else: - serializer.save(user=request.user) + serializer.save(user=request.user) + # no need to update the media file itself, only the metadata + #if request.data.get('media_file'): + # media_file = request.data["media_file"] + # serializer.save(user=request.user, media_file=media_file) + #else: + # serializer.save(user=request.user) return Response(serializer.data, status=status.HTTP_201_CREATED) return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)