Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False statement in the docs about INSTALLED_APPS #11

Open
moorchegue opened this issue May 11, 2017 · 7 comments
Open

False statement in the docs about INSTALLED_APPS #11

moorchegue opened this issue May 11, 2017 · 7 comments

Comments

@moorchegue
Copy link
Contributor

if you are making alot of api calls I recommend you to use the b2_storage.authorise,
it stores the seconds in your database and reuses the authorisation_token for other calls.
for this you need to include 'b2_storage.authorise', in your INSTALLED_APPS

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?

@royendgel
Copy link
Owner

Hi I will into this in the weekend.

@royendgel
Copy link
Owner

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 ?

@moorchegue
Copy link
Contributor Author

No, not really, I'm not even sure how to implement it, gotta read Backblaze docs…

@moorchegue
Copy link
Contributor Author

moorchegue commented Jul 10, 2017

@royendgel, check out this another approach: moorchegue@b212588

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.

@pycebs
Copy link

pycebs commented Sep 20, 2017

@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?

@moorchegue
Copy link
Contributor Author

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.

@bartoszhernas
Copy link

This makes this package really slow. We've fixed it by adjusting authorization code and returning it to Django differently:

https://github.com/whatsahoy/django-backblazeb2-storage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants