I am developing a Ruby on Rails app that utilizes a Java Uploader. The uploader creates a multipart HTML form and submits it to my upload controller. For testing purposes, I have also created a simple multipart HTML form with a single input generated with file_field_tag
.
The HTML version behaves as expected, and generates the following params hash:
Parameters: { "upload_files"=>[#<File:/var/folders/-C/-CuWf-OGEXSrqEIRpe1pp++++TM/-Tmp-/RackMultipart20100419-880-prlyf-0>], "authenticity_token"=>"GvOXKz3ujIiuaAIwNNwM1T/TImwBEoWVEG3SNjTRbCo=" }
However, the Java uploader generates the following params hash upon submittal:
Parameters: { "upload_files"=>[#<File:/var/folders/-C/-CuWf-OGEXSrqEIRpe1pp++++TM/-Tmp-/RackMultipart20100420-880-1rxj6kl-0>], "authenticity_token"=>#<File:/var/folders/-C/-CuWf-OGEXSrqEIRpe1pp++++TM/-Tmp-/RackMultipart20100420-880-16mx5nv-0> }
Notice the authenticity_token
is no longer plain text, but appears as a temp file.
What is going on?