Skip to content

Commit

Permalink
Fix copying of files > 5GB via aws-fog.
Browse files Browse the repository at this point in the history
This change utilizes multipart-upload logic from Fog::AWS::Storage::File#copy that was  added in
fog/fog-aws@e3a9a35
  • Loading branch information
slonopotamus committed Jul 7, 2021
1 parent e12fcbf commit 033ccd0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/carrierwave/storage/fog.rb
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ def filename(options = {})
# @return [CarrierWave::Storage::Fog::File] the location where the file will be stored.
#
def copy_to(new_path)
connection.copy_object(@uploader.fog_directory, file.key, @uploader.fog_directory, new_path, copy_options)
file.copy(@uploader.fog_directory, new_path, copy_options)
CarrierWave::Storage::Fog::File.new(@uploader, @base, new_path)
end

Expand Down

0 comments on commit 033ccd0

Please sign in to comment.