Ad

Ruby On Rails: ActiveResource And File Uploads

- 1 answer

Does anyone have experience with ActiveResource and file uploads? I have an Adobe Air desktop application which communicates with my Rails driven website's web services.

I'd like to post files to the server but I'm not entirely sure if I could do this with ActiveResource. Also, I'm having some concerns since I've read somewhere that AR cannot handle multipart requests. Not too promising.

Anyone have ideas how to do this? A link or a blog post maybe? Thanks in advance.

Ad

Answer

The bottomline is, activeresource does not handle multiparts.

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

These links will give you inspiration:

Ad
source: stackoverflow.com
Ad