How do i upload django media directory to object storage

Am using
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage' and
STATICFILES_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage',
but when i run command python manage.py collectstatic --noinput.
Only static directory is uploaded. And media directory does not get uploaded

1 Reply

This guide titled Linode Object Storage for Django Static Files - Blog Post provides instructions for setting up your Django app with Linode Object Storage.

I haven't personally run through the guide to test it out, however based on the information provided, as long as you've run python manage.py collectstatic --noinput from within the virtual enviornment and within your project directory, your static files should be uploaded to your bucket. If you have a separate media directory that is not getting uploaded, is it possible it is outside of your project directory?

You may also want to consult the django-storages documentation.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct