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

Private fog setting with carrierwave doesn't return URL #6

Open
kevivmatrix opened this issue Jun 4, 2018 · 8 comments · May be fixed by #20
Open

Private fog setting with carrierwave doesn't return URL #6

kevivmatrix opened this issue Jun 4, 2018 · 8 comments · May be fixed by #20

Comments

@kevivmatrix
Copy link

kevivmatrix commented Jun 4, 2018

CarrierWave.configure do |config|
  config.fog_credentials = {
    provider: 'backblaze',
    b2_account_id: ENV['BACKBLAZE_ACCOUNT_ID'],
    b2_account_token: ENV['BACKBLAZE_ACCOUNT_TOKEN']
  }
  config.fog_public = false
end
# Public
fog_public = true
object.file.url 
# https://f001.backblazeb2.com/file/bucket/uploads/file.jpg
# Private
With fog_public = false
object.file.url
# /uploads/file.jpg
@Paxa
Copy link
Collaborator

Paxa commented Feb 11, 2019

Currently doesn't support private buckets, do you want to implement it?

@kevivmatrix
Copy link
Author

@Paxa Yeah sure. I did implement the private logic for my project. I will cleanup the code and open the PR soon.

@owexroasia
Copy link

whats the status of this feature?

@kevivmatrix
Copy link
Author

@Paxa I have added implemented the support for private buckets. Linked the PRs above.

@shanecav84
Copy link
Contributor

I don't see how the above PRs provide support for private buckets. #20 seems to add support for B2's Large File Upload.

@kevivmatrix
Copy link
Author

@shanecav84
Copy link
Contributor

Ah! Ok. My setup isn't working for some reason, but I am able to upload to a private bucket. The name for #20 is misleading though. Thanks!

@kevivmatrix
Copy link
Author

Ok great. I don't remember the changes exactly since I did it a long back.
But I think there were some changes in the #20 to make the private buckets work.

Perhaps this one - https://github.com/fog/fog-backblaze/pull/20/files#diff-2208bab78b55edf5d0f6958e8f0d920eR56-R59

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

Successfully merging a pull request may close this issue.

4 participants