fog / fog-backblaze

Integration library for gem fog and Backblaze B2 Cloud Storage
MIT License
19 stars 22 forks source link

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

Open kevivmatrix opened 6 years ago

kevivmatrix commented 6 years ago
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 commented 5 years ago

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

kevivmatrix commented 5 years ago

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

owexroasia commented 4 years ago

whats the status of this feature?

kevivmatrix commented 4 years ago

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

shanecav84 commented 4 years ago

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 commented 4 years ago

@shanecav84 https://github.com/carrierwaveuploader/carrierwave/pull/2444

shanecav84 commented 4 years ago

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 commented 4 years ago

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