I am using fancyupload and paperclip to upload files, everything was working perfectly fine until I added authentication and account validation inside the controller.
I am just using my normal current_user nothing special about that, the rest of the application is dealing with it just fine.
how can I get sesssion data working with fancyupload.
B.T.W I am using activerecord_store in my session_store.rb file.
appreciate you help
The issue here is that Flash requests lack the cookies in their headers. This is true for any uploader that uses Flash (or has Flash as an option, like plupload).
What you need to do in this case, is to tell FancyUpload to append the cookie data to the request with the option
appendCookieDataset to true and then reconstruct the session in the server based on that (cookie data goes as part of the GET or POST request, not as headers, so most frameworks won’t automatically handle this way of authentication).Do note that using that option appends all your cookies to the request, so if your app is heavy on cookie usage it would be better to extract the cookie you need (MooTools has a built-in Cookie helper) and add it to the request with the
dataoption.