Skip to content

Commit

Permalink
Fix bug with local direct uploads
Browse files Browse the repository at this point in the history
  • Loading branch information
blms committed Aug 22, 2024
1 parent b94b4b8 commit 33f99aa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions app/controllers/direct_uploads_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
class DirectUploadsController < ActiveStorage::DirectUploadsController
skip_forgery_protection
end
1 change: 0 additions & 1 deletion config/initializers/active_storage_api_modification.rb

This file was deleted.

1 change: 1 addition & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
get '/images/:signed_id' => 'documents#get_image_by_signed_id'
post '/documents/create_batch' => 'documents#create_batch'
post '/jobs' => 'documents#get_jobs_by_id'
post '/rails/active_storage/direct_uploads' => 'direct_uploads#create'

get '*path', to: "application#fallback_index_html", constraints: ->(request) do
!request.xhr? && request.format.html?
Expand Down

0 comments on commit 33f99aa

Please sign in to comment.