undefined method `content_type'

You can't upload via XMLHTTPRequest. :frowning: Javascript does not have
access to local files on your computer for security purposes.

Take a look at this post:

You can use an Iframe for stuff like this.