Django + Storage

Posted November 11, 2020 626 views


I have configured the setting to use a digital ocean storage.

Here are the main settings:


    'CacheControl': 'max-age=86400',
AWS_LOCATION = 'staticescaping'
AWS_DEFAULT_ACL = 'public-read'

STATICFILES_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'

Then I run collectstatic, and several statics files appear in the server but then an error appear:

botocore.exceptions.ClientError: An error occurred () when calling the PutObject operation:

I think that is an internal error of storage. Could be?


1 comment

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

I have the same exact issue. Anyone at DigitalOcean able to shed some light on this?

@chugharyan816 I was talking with support and the error seams to be the upload cadence that is to high.

I used only for media images. Another options is to use another cloud provider like S3. That works perfectly.

If not you could make a custom script to upload the images to storage.

  • Thank you for such a fast response.

    Is there any way that I can use a custom script for collecting static data to digital ocean spaces ? or any library that I could use for the same ? so that this issue of high upload cadence is solved