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

Backblaze private bucket support #2444

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
backblaze private bucket support added
  • Loading branch information
kevivmatrix committed Jun 16, 2019
commit ed7b2159fef1c4c926109ab3f2181dcc484d280b
2 changes: 1 addition & 1 deletion lib/carrierwave/storage/fog.rb
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def attributes
# [NilClass] no authenticated url available
#
def authenticated_url(options = {})
if ['AWS', 'Google', 'Rackspace', 'OpenStack', 'AzureRM', 'Aliyun'].include?(@uploader.fog_credentials[:provider])
if ['AWS', 'Google', 'Rackspace', 'OpenStack', 'AzureRM', 'Aliyun', 'backblaze'].include?(@uploader.fog_credentials[:provider])
# avoid a get by using local references
local_directory = connection.directories.new(:key => @uploader.fog_directory)
local_file = local_directory.files.new(:key => path)
Expand Down
1 change: 1 addition & 0 deletions lib/carrierwave/uploader/cache.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ def cache_stored_file!

def sanitized_file
_content = file.read
return if _content.nil?
if _content.is_a?(File) # could be if storage is Fog
sanitized = CarrierWave::Storage::Fog.new(self).retrieve!(File.basename(_content.path))
else
Expand Down