[LRUG] Flex/Rails and downloading data to a file

Kenneth Lee kenfodder at gmail.com
Wed Apr 28 06:58:56 PDT 2010


Hey,

send_data sends binary data, not getting the expected results doesn't 
tell me much, can you find out what you are getting back? content-type 
etc... Also what are you expecting back, json, xml, a file?

I recommend using curl or even a browser to talk to rails via http and 
see if the data is what you expect your Flex app to receive as really 
it's just acting as an API.

Also for the invalid auth token just remove protect_from_forgery from 
you application controller, or at least that is where you should start 
as that is where the error is originating from I believe.

Hope this gets you started.

Ken

Jordi Noguera Leon wrote:
> Hi there!
>
> I'm struggling to solve the following problem. We have an app with a 
> flex front end that displays some charts, each chart has a link to 
> download the data displayed in that chart. To do this I tried to call 
> a rails method that called send_data, but it didn't produce the 
> expected results. It'd be good if there was an easy way to do this 
> directly from Flex...
>
> I've also been trying to follow the steps explained in this article 
> <http://flexonrails.net/?p=5>, but I'm getting an Invalid Auth token 
> error...
>
> Does anyone have an idea?
>
> Cheers,
> Jordi
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Chat mailing list
> Chat at lists.lrug.org
> http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>    
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20100428/61af64ab/attachment.html>


More information about the Chat mailing list