diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2017-07-09 15:24:34 +0200 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2017-07-09 15:24:34 +0200 |
commit | a1a068061ad2e30424c73b530ad8f96f0454f25f (patch) | |
tree | 2a0e44cce130998f3463469feb8782b0cd080c8c /lib | |
parent | 01109dc00357b758c5809708f510bcef6442350b (diff) | |
download | rails-a1a068061ad2e30424c73b530ad8f96f0454f25f.tar.gz rails-a1a068061ad2e30424c73b530ad8f96f0454f25f.tar.bz2 rails-a1a068061ad2e30424c73b530ad8f96f0454f25f.zip |
Ensure binary encoding for downloading
Diffstat (limited to 'lib')
-rw-r--r-- | lib/active_storage/service/s3_service.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/active_storage/service/s3_service.rb b/lib/active_storage/service/s3_service.rb index 963a41af17..09886ca863 100644 --- a/lib/active_storage/service/s3_service.rb +++ b/lib/active_storage/service/s3_service.rb @@ -19,7 +19,7 @@ class ActiveStorage::Service::S3Service < ActiveStorage::Service if block_given? stream(key, &block) else - object_for(key).get.body.read + object_for(key).get.body.read.force_encoding(Encoding::BINARY) end end |