diff options
author | George Claghorn <george.claghorn@gmail.com> | 2017-12-13 14:22:40 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-13 14:22:40 -0500 |
commit | bf4ee05a1b948b76ad76a450a41376804dde57ba (patch) | |
tree | 9371c32f909cda7bff76cb7085d1ebd20000f9f0 /activestorage | |
parent | 8da117ed4387773850d9102ae1c8de4765058ce7 (diff) | |
parent | ff25c25127405f49c0021714a9d938558c7822ab (diff) | |
download | rails-bf4ee05a1b948b76ad76a450a41376804dde57ba.tar.gz rails-bf4ee05a1b948b76ad76a450a41376804dde57ba.tar.bz2 rails-bf4ee05a1b948b76ad76a450a41376804dde57ba.zip |
Merge pull request #31429 from meinac/expose_activestorage_routes
Expose Active Storage routes
Diffstat (limited to 'activestorage')
-rw-r--r-- | activestorage/config/routes.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/activestorage/config/routes.rb b/activestorage/config/routes.rb index 1eae21445a..ad9640ce03 100644 --- a/activestorage/config/routes.rb +++ b/activestorage/config/routes.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true Rails.application.routes.draw do - get "/rails/active_storage/blobs/:signed_id/*filename" => "active_storage/blobs#show", as: :rails_service_blob, internal: true + get "/rails/active_storage/blobs/:signed_id/*filename" => "active_storage/blobs#show", as: :rails_service_blob direct :rails_blob do |blob, options| route_for(:rails_service_blob, blob.signed_id, blob.filename, options) @@ -11,7 +11,7 @@ Rails.application.routes.draw do resolve("ActiveStorage::Attachment") { |attachment, options| route_for(:rails_blob, attachment.blob, options) } - get "/rails/active_storage/variants/:signed_blob_id/:variation_key/*filename" => "active_storage/variants#show", as: :rails_blob_variation, internal: true + get "/rails/active_storage/variants/:signed_blob_id/:variation_key/*filename" => "active_storage/variants#show", as: :rails_blob_variation direct :rails_variant do |variant, options| signed_blob_id = variant.blob.signed_id @@ -24,7 +24,7 @@ Rails.application.routes.draw do resolve("ActiveStorage::Variant") { |variant, options| route_for(:rails_variant, variant, options) } - get "/rails/active_storage/previews/:signed_blob_id/:variation_key/*filename" => "active_storage/previews#show", as: :rails_blob_preview, internal: true + get "/rails/active_storage/previews/:signed_blob_id/:variation_key/*filename" => "active_storage/previews#show", as: :rails_blob_preview direct :rails_preview do |preview, options| signed_blob_id = preview.blob.signed_id @@ -37,7 +37,7 @@ Rails.application.routes.draw do resolve("ActiveStorage::Preview") { |preview, options| route_for(:rails_preview, preview, options) } - get "/rails/active_storage/disk/:encoded_key/*filename" => "active_storage/disk#show", as: :rails_disk_service, internal: true - put "/rails/active_storage/disk/:encoded_token" => "active_storage/disk#update", as: :update_rails_disk_service, internal: true - post "/rails/active_storage/direct_uploads" => "active_storage/direct_uploads#create", as: :rails_direct_uploads, internal: true + get "/rails/active_storage/disk/:encoded_key/*filename" => "active_storage/disk#show", as: :rails_disk_service + put "/rails/active_storage/disk/:encoded_token" => "active_storage/disk#update", as: :update_rails_disk_service + post "/rails/active_storage/direct_uploads" => "active_storage/direct_uploads#create", as: :rails_direct_uploads end |