rubyonrailsin

A Ruby and Rails talk

Saturday, March 20, 2010


Re: [Rails] Rails AJAX file upload without Flash and RJS, just a dream?

by rubyonrailsin 0 comments

Tag


Share this post:
Design Float
StumbleUpon
Reddit


On 20 Mar 2010, at 16:50, Lb2007 wrote:

As my app is continuing to grow a little older, I've come to the point
where I want to allow a user to upload an avatar (with Paperclip)
using AJAX. However, I've noticed just about the only way to get this
done is to use the (imo) pretty dirty solutions with either Flash or
the remote_form_for RJS stuff.

For instance http://valums.com/wp-content/uploads/ajax-upload/demo-jquery.htm
seems to offer a pretty neat solution on how to style the upload
stuff, but from what I've read, it's not possible to get this done
properly due to the CSRF stuff.

So now I'm wondering; isn't it possible to get AJAX uploads working
using jQuery with the CSRF protection enabled, without using Flash or
RJS?

Until all browsers implement the HTML5 File API, one of those methods will have to do. Until then, this is just a dream: https://developer.mozilla.org/en/Using_files_from_web_applications


Best regards


Peter De Berdt


No comments:

Post a Comment

Subscribe feeds via e-mail

Blog Archive