EDIT: The real question was whether or not you can use a JSON http header, and how to format an XHR send of a file to a Rails application.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
In order to get the file there successfully, you might need to assemble a request with a content-type of "multipart/form-data". Here's a page I found that seems to have the right kind of information to send you in the right direction:
http://www.smokycogs.com/blog/titanium-tutorial-how-to-upload-a-file-to-a-server/