AhmedNadar PRO said over 3 years ago on StimulusJS, Active Storage and DropzoneJS :
Here is rails log on upload an image attempt  

10:34:19 web.1     | Started POST "/rails/active_storage/direct_uploads" for ::1 at 2021-03-27 10:34:19 +0400
10:34:20 web.1     | Processing by ActiveStorage::DirectUploadsController#create as JSON
10:34:20 web.1     |   Parameters: {"blob"=>{"filename"=>"Screen Shot 2021-03-26 at 21.24.18 (2).png", "content_type"=>"image/png", "byte_size"=>2957763, "checksum"=>"knBZupa2TdcuU831UUgj+A=="}, "direct_upload"=>{"blob"=>{"filename"=>"Screen Shot 2021-03-26 at 21.24.18 (2).png", "content_type"=>"image/png", "byte_size"=>2957763, "checksum"=>"knBZupa2TdcuU831UUgj+A=="}}}
10:34:20 web.1     | Can't verify CSRF token authenticity.
10:34:20 web.1     | Completed 422 Unprocessable Entity in 2ms (ActiveRecord: 0.0ms | Allocations: 1024)
10:34:20 web.1     |
10:34:20 web.1     |
10:34:20 web.1     |
10:34:20 web.1     | ActionController::InvalidAuthenticityToken - ActionController::InvalidAuthenticityToken:
10:34:20 web.1     |