Titanium + Rails + Paperclip === NULL 值? [英] Titanium + Rails + Paperclip === NULL values?

查看:31
本文介绍了Titanium + Rails + Paperclip === NULL 值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

真正的问题是您是否可以使用 JSON http 标头,以及如何格式化 XHR 发送到 Rails 应用程序的文件.

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.

推荐答案

为了成功获取文件,您可能需要组合内容类型为multipart/form-data"的请求.这是我发现的一个页面,它似乎有正确的信息可以向您发送正确的方向:

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/

这篇关于Titanium + Rails + Paperclip === NULL 值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆