简体   繁体   English

Ruby On Rails:ActiveResource和文件上传

[英]Ruby On Rails: ActiveResource and file uploads

Does anyone have experience with ActiveResource and file uploads? 有没有人有ActiveResource和文件上传的经验? I have an Adobe Air desktop application which communicates with my Rails driven website's web services. 我有一个Adobe Air桌面应用程序,它与我的Rails驱动的网站的Web服务进行通信。

I'd like to post files to the server but I'm not entirely sure if I could do this with ActiveResource. 我想将文件发布到服务器,但我不完全确定我是否可以使用ActiveResource执行此操作。 Also, I'm having some concerns since I've read somewhere that AR cannot handle multipart requests. 此外,我有一些担忧,因为我读过AR无法处理多部分请求的地方。 Not too promising. 不太有希望。

Anyone have ideas how to do this? 任何人都有想法如何做到这一点? A link or a blog post maybe? 可能是链接或博客文章? Thanks in advance. 提前致谢。

The bottomline is, activeresource does not handle multiparts. 底线是,activeresource不处理多部分。

Options could be to use: - Curb: Curl for ruby - Code your own handler - rest-client (git fork with multipart streaming) - Use httpclient with multipart posts 选项可能是使用: - 路边:红宝石的卷曲 - 编码你自己的处理程序 - rest-client(带有多部分流的git fork) - 使用httpclient和多部分帖子

These links will give you inspiration: 这些链接会给你灵感:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM