From 4deb88ca2672d536b47bfc5e0477253a3a068601 Mon Sep 17 00:00:00 2001 From: Hiroki Sanpei Date: Wed, 28 Nov 2018 17:06:29 +0900 Subject: [PATCH] Fix `ArgumentError` when uploading to amazon s3 --- activestorage/CHANGELOG.md | 4 ++++ activestorage/lib/active_storage/service/s3_service.rb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/activestorage/CHANGELOG.md b/activestorage/CHANGELOG.md index ba573153016df..ea9b10add9313 100644 --- a/activestorage/CHANGELOG.md +++ b/activestorage/CHANGELOG.md @@ -1,3 +1,7 @@ +* Fix `ArgumentError` when uploading to amazon s3 + + *Hiroki Sanpei* + * Add progressive JPG to default list of variable content types *Maurice Kühlborn* diff --git a/activestorage/lib/active_storage/service/s3_service.rb b/activestorage/lib/active_storage/service/s3_service.rb index 89a9e54158c47..90c3ae1b62cb7 100644 --- a/activestorage/lib/active_storage/service/s3_service.rb +++ b/activestorage/lib/active_storage/service/s3_service.rb @@ -16,7 +16,7 @@ def initialize(bucket:, upload: {}, **options) @upload_options = upload end - def upload(key, io, checksum: nil) + def upload(key, io, checksum: nil, **) instrument :upload, key: key, checksum: checksum do begin object_for(key).put(upload_options.merge(body: io, content_md5: checksum))