Question

Can't upload file to Digital Ocean Spaces (Django - Gunicorn - Nginx)

Hello there, im looking for some help about this topic, my django project is running well on my localhost, I can upload file to Digital Ocean Spaces, I can load my static files without any issue.

But, i can’t upload file after deploy everything to my digital ocean server, and i’m unable to see what exactly is happening.

Any idea what could be?

Note: i tested the upload capacity with boto3 using my credentials within python console and everything is running good, file was uploaded.

Thank you!


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Bobby Iliev
Site Moderator
Site Moderator badge
January 17, 2025

Hi there,

What is the exact error that you get when you try to upload? Do you see any errors in the logs as well?

What you should do is to make sure your Spaces credentials (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_STORAGE_BUCKET_NAME) are correctly set on your server. Sometimes they work locally but are missing or misconfigured in production.

- Bobby

KFSys
Site Moderator
Site Moderator badge
January 19, 2025

Heya,

What error are you receiving in the logs? That’s the best place to look and see the exact reason.

alexdo
Site Moderator
Site Moderator badge
January 20, 2025

Heya, @med434c797c94e406eb7a077db18db

I’ll double check that the credentials stored in Django are the same that are working fine when tested using boto3

Also if there is an additional logging available to print an error or some other useful information for debugging.

Regards

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.