You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using Django and DjangoRestFramework, and I have a model with a FileField attribute
I have two ways of creating this model. Both receive the same values, but one of them raises Input foo.png of type: <class 'django.core.files.uploadedfile.InMemoryUploadedFile'> is not supported.
I can through the respective endpoint, create Bar and upload to S3, no problem
In the Foo endpoint (I'm updating Foo), I want to upload the logo, but also create the bar. I'm overriding the serializer to do this.
With this, I get Input foo.png of type: <class 'django.core.files.uploadedfile.InMemoryUploadedFile'> is not supported.
Following the stacktrace, It starts in the return super().update(instance, validated_data) and ends in the UploadSubmissionTask _get_upload_input_manager_cls
From what I see in the debug, the fileobj is the same for both requests, with a slight difference (the second image is with the Foo endpoint):
What am I missing? Can't I use the same InMemoryUploadedFile for 2 uploads?
The text was updated successfully, but these errors were encountered:
I'm using Django and DjangoRestFramework, and I have a model with a FileField attribute
I have two ways of creating this model. Both receive the same values, but one of them raises
Input foo.png of type: <class 'django.core.files.uploadedfile.InMemoryUploadedFile'> is not supported.
Giving my example:
I can through the respective endpoint, create Bar and upload to S3, no problem
In the Foo endpoint (I'm updating Foo), I want to upload the logo, but also create the bar. I'm overriding the serializer to do this.
With this, I get
Input foo.png of type: <class 'django.core.files.uploadedfile.InMemoryUploadedFile'> is not supported.
Following the stacktrace, It starts in the
return super().update(instance, validated_data)
and ends in theUploadSubmissionTask _get_upload_input_manager_cls
From what I see in the debug, the fileobj is the same for both requests, with a slight difference (the second image is with the Foo endpoint):
What am I missing? Can't I use the same InMemoryUploadedFile for 2 uploads?
The text was updated successfully, but these errors were encountered: