Open moorchegue opened 7 years ago
Hi I will into this in the weekend.
Hi @moorchegue it was planned to go into the code, but never happened, I will leave it as is and implement it. did you do something about it ?
No, not really, I'm not even sure how to implement it, gotta read Backblaze docs…
@royendgel, check out this another approach: https://github.com/moorchegue/django-backblazeb2-storage/commit/b212588ba6ca0ba3e0c81115307815bbfb18bbcb
I took out authorization request from the constructor to speed up application start and made it sort of lazyish. It doesn't really reuse a token for multiple instances as initially planned, I guess. Should I update the docs and make a PR? Not sure if you'd like this solution or not, so asking first.
@moorchegue I tried to contact you via your fork, but I cannot create a new "Issue". Have you implemented this in your fork yet? I saw you did a lot of work/refactoring the last few weeks. Is your fork "safe to use"? I want to share files in a private bucket, so the URL cannot be shared (no authentication) publicly but only through my website. The official docs say this:
An account authorization token, obtained from b2_authorize_account. This is required if the bucket containing the file is not public. It is optional for buckets that are public.
https://www.backblaze.com/b2/docs/b2_download_file_by_id.html
Is this supported by the plugin?
I have. However it's been a while, so I don't remember clearly and I probably haven't checked that scenario, sorry. There is a chance private buckets just don't work. I'm using the fork in production for several months now with public buckets only. It's stable enough, but every once in a while Backblaze service itself gets unstable and I add more and more defensive code.
I'll need private buckets as well eventually and if it's not sorted out by then I'll get back to you with a PR.
This makes this package really slow. We've fixed it by adjusting authorization code and returning it to Django differently:
There's no such thing as
b2_storage.authorise
in the code, so adding it to INSTALLED_APPS causes an Exception. Was it planned but not implemented? Was it implemented differently but not updated in the docs?