aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage/app
diff options
context:
space:
mode:
authorGeorge Claghorn <george@basecamp.com>2018-07-15 20:12:53 -0400
committerGeorge Claghorn <george@basecamp.com>2018-07-15 20:12:53 -0400
commit94f2558f6a5bd315334d1b57a9aeeef48abfea20 (patch)
treee5daf377d227b0472a6060dacd5610105e9c2331 /activestorage/app
parent390097531bd17369f05a23eba58c37b850ac95dd (diff)
downloadrails-94f2558f6a5bd315334d1b57a9aeeef48abfea20.tar.gz
rails-94f2558f6a5bd315334d1b57a9aeeef48abfea20.tar.bz2
rails-94f2558f6a5bd315334d1b57a9aeeef48abfea20.zip
Restore inadvertently-removed fallback
Diffstat (limited to 'activestorage/app')
-rw-r--r--activestorage/app/controllers/active_storage/disk_controller.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/activestorage/app/controllers/active_storage/disk_controller.rb b/activestorage/app/controllers/active_storage/disk_controller.rb
index 436cd0ccd8..75cc11d6ff 100644
--- a/activestorage/app/controllers/active_storage/disk_controller.rb
+++ b/activestorage/app/controllers/active_storage/disk_controller.rb
@@ -19,10 +19,11 @@ class ActiveStorage::DiskController < ActiveStorage::BaseController
if token = decode_verified_token
if acceptable_content?(token)
disk_service.upload token[:key], request.body, checksum: token[:checksum]
- head :no_content
else
head :unprocessable_entity
end
+ else
+ head :not_found
end
rescue ActiveStorage::IntegrityError
head :unprocessable_entity