diff --git a/activestorage/CHANGELOG.md b/activestorage/CHANGELOG.md index 0a83de827268d..57bd1ce358dde 100644 --- a/activestorage/CHANGELOG.md +++ b/activestorage/CHANGELOG.md @@ -1,3 +1,7 @@ +* Fix `ArgumentError` when uploading to amazon s3 + + *Hiroki Sanpei* + ## Rails 5.2.1.1 (November 27, 2018) ## * Prevent content type and disposition bypass in storage service URLs. diff --git a/activestorage/lib/active_storage/service/s3_service.rb b/activestorage/lib/active_storage/service/s3_service.rb index 0286e7ff21b22..cc63d9cd6cc69 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))