fog-backblaze icon indicating copy to clipboard operation
fog-backblaze copied to clipboard

Private fog setting with carrierwave doesn't return URL

Open kevivmatrix opened this issue 6 years ago • 8 comments

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

kevivmatrix avatar Jun 04 '18 20:06 kevivmatrix

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

Paxa avatar Feb 11 '19 15:02 Paxa

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

kevivmatrix avatar Feb 13 '19 08:02 kevivmatrix

whats the status of this feature?

owexroasia avatar Nov 05 '19 14:11 owexroasia

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

kevivmatrix avatar Dec 24 '19 19:12 kevivmatrix

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

shanecav84 avatar Jun 12 '20 04:06 shanecav84

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

kevivmatrix avatar Jun 12 '20 07:06 kevivmatrix

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!

shanecav84 avatar Jun 12 '20 16:06 shanecav84

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

kevivmatrix avatar Jun 12 '20 17:06 kevivmatrix