1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #32703 from janko-m/halve-memory-allocation-in-s3-download

Halve memory allocation in S3Service#download
This commit is contained in:
George Claghorn 2018-04-23 15:08:26 -05:00 committed by GitHub
commit e970d15211
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -33,7 +33,7 @@ module ActiveStorage
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