Is there a clean way of using Dropbox as storage for django media files?. Like you would do with s3boto and AmazonS3 described here: How to set-up a Django project with django-storages and Amazon S3
Thanks
A Django files storage using Dropbox as a backend via the official Dropbox SDK for Python. Currently only v2 of the API is supported.
By default, Django stores files locally, using the MEDIA_ROOT and MEDIA_URL settings. The examples below assume that you're using these defaults. However, Django provides ways to write custom file storage systems that allow you to completely customize where and how Django stores files.
django-storages is a project to provide a variety of storage backends in a single library. This library is usually compatible with the currently supported versions of Django. Check the Trove classifiers in setup.py to be sure. django-storages is backed in part by Tidelift.
django-storages has a dropbox implementation ready to go, just
pip install dropbox django-storages
and in your settings file:
INSTALLED_APPS += ( 'storages', )
DEFAULT_FILE_STORAGE = 'storages.backends.dropbox.DropBoxStorage'
From: http://django-storages.readthedocs.io/en/latest/backends/dropbox.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With