[Solved]-Uploading a file with Django REST framework ListCreateAPIView

9πŸ‘

βœ…

I believe the issue is in your serializer class where you define the image model field as Field. The generic Field is read-only, so that may be the source of the problem. Try simply removing that from your serializer, as it isn’t necessary:

class PhotoSerializer(serializers.ModelSerializer):

    class Meta:
        model = Photo

Hope this helps, let me know how you get along.

πŸ‘€Fiver

Leave a comment