diff options
author | Javan Makhmali <javan@javan.us> | 2018-04-10 06:36:47 -0400 |
---|---|---|
committer | Javan Makhmali <javan@javan.us> | 2018-04-10 06:36:47 -0400 |
commit | efb7dc65d9e38a824e1e8dbeb376b3fab5c7605b (patch) | |
tree | 5673b305310972240d3f97799f9f7a7e6de187b8 /activestorage/app/controllers/active_storage | |
parent | c6ae623955909141fbea33e30742596423f61f78 (diff) | |
download | rails-efb7dc65d9e38a824e1e8dbeb376b3fab5c7605b.tar.gz rails-efb7dc65d9e38a824e1e8dbeb376b3fab5c7605b.tar.bz2 rails-efb7dc65d9e38a824e1e8dbeb376b3fab5c7605b.zip |
Always exclude JSON root from direct_uploads#create response
The JavaScript component expects a bare response.
Fixes #32365
Diffstat (limited to 'activestorage/app/controllers/active_storage')
-rw-r--r-- | activestorage/app/controllers/active_storage/direct_uploads_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activestorage/app/controllers/active_storage/direct_uploads_controller.rb b/activestorage/app/controllers/active_storage/direct_uploads_controller.rb index cbe2cf2c35..78b43fc94c 100644 --- a/activestorage/app/controllers/active_storage/direct_uploads_controller.rb +++ b/activestorage/app/controllers/active_storage/direct_uploads_controller.rb @@ -15,7 +15,7 @@ class ActiveStorage::DirectUploadsController < ActiveStorage::BaseController end def direct_upload_json(blob) - blob.as_json(methods: :signed_id).merge(direct_upload: { + blob.as_json(root: false, methods: :signed_id).merge(direct_upload: { url: blob.service_url_for_direct_upload, headers: blob.service_headers_for_direct_upload }) |