Skip to content

Commit

Permalink
Merge pull request #32703 from janko-m/halve-memory-allocation-in-s3-…
Browse files Browse the repository at this point in the history
…download

Halve memory allocation in S3Service#download
  • Loading branch information
georgeclaghorn committed Apr 23, 2018
1 parent 6d3e453 commit c0ae559
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion activestorage/lib/active_storage/service/s3_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def download(key, &block)
end
else
instrument :download, key: key do
object_for(key).get.body.read.force_encoding(Encoding::BINARY)
object_for(key).get.body.string.force_encoding(Encoding::BINARY)
end
end
end
Expand Down

0 comments on commit c0ae559

Please sign in to comment.