diff options
Diffstat (limited to 'lib/active_storage/service/s3_service.rb')
-rw-r--r-- | lib/active_storage/service/s3_service.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/active_storage/service/s3_service.rb b/lib/active_storage/service/s3_service.rb index 413789e2b5..963a41af17 100644 --- a/lib/active_storage/service/s3_service.rb +++ b/lib/active_storage/service/s3_service.rb @@ -11,6 +11,8 @@ class ActiveStorage::Service::S3Service < ActiveStorage::Service def upload(key, io, checksum: nil) object_for(key).put(body: io, content_md5: checksum) + rescue Aws::S3::Errors::BadDigest + raise ActiveStorage::IntegrityError end def download(key) |