Search code examples
ruby-on-rails-3internet-explorerdeviseuploadify

Uploadify with IE 8 resetting the session (sever side is Rails 3 with Devise)


I have a super simple user profile page. The user logs in, go the profile page and upload a profile photo. For the upload I use Uploadify with the usual session hack.

Everything works perfectly in FF5, Safari and Chrome but when I test on IE 8 I see the following behavior:

  • uploadify upload the photo correctly
  • but when I click on the "save" button to save the profile the server redirects me to the signin page.

A little investigation has shown me that after the call to Uploadify it seems that IE destroys the cookies with the session in it therefore the use is pretty much logged out.

Any help is really appreciated. Thanks, -Matteo


Solution

  • Solved the issue by adding: protect_from_forgery :except => :create to the assets_controller, this is the controller used to upload files.