from django.conf import settings
from storages.backends.s3boto3 import S3Boto3Storage
class MediaStorage(S3Boto3Storage):
location = settings.MEDIA_FILES_LOCATION
default_acl = 'public-read'
file_overwrite = False
When I tried to save the image using the create method, it threw an exception of sequence item 0: expected str instance, NoneType found and the response status was 423.
The packages version I am using is as follows:
boto3==1.34.127
Django==4.2.13
djangorestframework==3.14.0
django-storages==1.14.3
...
Hi, I encountered some issues while using django storage to save images to Cloudflare R2.
I have configured the following content in the settings file:
custom_storage.py:
When I tried to save the image using the create method, it threw an exception of
sequence item 0: expected str instance, NoneType found
and the response status was 423.The packages version I am using is as follows: boto3==1.34.127 Django==4.2.13 djangorestframework==3.14.0 django-storages==1.14.3 ...
What do I need to do to make it work properly?