swfupload with active_record_store? Or any other 'mass'-uploader?

Hello there,

Has anyone successfully integrated swfupload into his/her rails (2.x)
project using a non cookie based session store? I am asking because
with the active_record_store (let alone stefan kaes'
sql_session_store) I can't get it to work at all, when re-enabling
cookies (meh) it works .. uploading wise, but now I get
InvalidAuthenticityToken Exceptions in other places, e.g. when
destroying an object.

Alternatively, does anyone know (first hand) any other, rails-
friendlier mass-uploading solutions?

Cheers,
-J

You’re going to face the same problem with all of them, and to be honest, SWFUpload is the only one I got to work with Rails >2 apps.

If you follow my instructions as I posted them a while ago, you should be able to get it to work (my solution works for sure with the cookiestore, but it should work for any session store):

http://www.ruby-forum.com/topic/161291

Best regards

Peter De Berdt

Hello there Peter,

thanks! I've taken your modified swfupload fix and simply added a tiny
block to accommodate the ActiveRecord:Store

http://gist.github.com/11753

Cheers and have a nice weekend! :slight_smile:

-J

We applied the patch as Peter described and had good results.
Recently, the uploads started failing for a significant number of our
users - they are told to login even though they already
authenticated. We upgraded to Rails 2.1.1, so I'm looking for a cause
there (though tests succeed). I'm also looking for browser-specific
behavior, since some users seem to be able to upload successfully.

Please let me know if you've seen any new issues crop up with Rails
2.1.1.

> Has anyone successfully integrated swfupload into his/her rails (2.x)

[ .. snip ..]

One thing to be aware of, is that the Flash Player 10 beta will break all of the current Flash-based uploaders because of new security measures put into place. A workaround solution has been posted on the Adobe Flash blog (putting a transparent flash movie over the link instead of calling some javascript that triggers the file dialog from the onclick event) but I don’t think any of the uploaders has implemented such a solution yet.

I haven’t come across your problem though, even though our users have a variety of browsers (we don’t support IE6 anymore, and have no official support for Opera and Chrome (yet)).

Best regards

Peter De Berdt

The current swfupload 2.2 betas have that workaround integrated.. and
it works perfectly fine. Only minor changes need to be made the way
the swfupload is initialized...

-J