![]() To retrieve file metadata ("file info" as the b2 sdk names it), this library has to authorize and request data from b2 servers, even for just resolving the url for a file. Add the urls to your urlpatterns in the root urls.py:.Add django_backblaze_b2 to your INSTALLED_APPS. ![]() FileField ( upload_to = "uploads", storage = BackblazeB2Storage ) Public/Logged-In/Private storage from django_backblaze_b2 import BackblazeB2Storage class MyModel ( models. Theoretically you may now refer to the base storage class as a storage class (see the sample app for some usage: you can run with make run-sample-proj although you might want to configure the SECONDS_TO_RUN_APP variable in settings.env to be 0 for unlimited to try things out)Į.g. Install from this repo, or install from PyPi: pip install django-backblaze-b2Īs tested, requires python 3.7 or greater but solely due to type annotations.Implementation wraps Official Python SDK How to use A storage backend for Django that uses Backblaze's B2 APIs. ![]()
0 Comments
Leave a Reply. |