fog-backblaze
fog-backblaze copied to clipboard
Private fog setting with carrierwave doesn't return URL
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
Currently doesn't support private buckets, do you want to implement it?
@Paxa Yeah sure. I did implement the private logic for my project. I will cleanup the code and open the PR soon.
whats the status of this feature?
@Paxa I have added implemented the support for private buckets. Linked the PRs above.
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 https://github.com/carrierwaveuploader/carrierwave/pull/2444
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!
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