I'm using Uploadify 3.1 with Rails 3.2.2. I use Authlogic to deal with authentication. Authlogic provides a current_user method which gives the user which made the request.
When I try to upload some file with Uploadify 3.1, current_user is not set when looked for in an action, it gives nil. This did not happen with the Uploadify 2.1.4. Here is how I'm calling uploadify:
jQuery('#something').uploadify({
uploader : '#{some_path_from_rails_routes}',
swf : '/uploadify/uploadify.swf',
cancelImg : '/uploadify/cancel.png',
fileTypeDesc : 'FileNames',
auto : true,
removeCompleted : false,
buttonText : 'Some Label',
formData : {
'_http_accept': 'application/javascript',
'#{session_key_name}' : encodeURIComponent('#{u(cookies[session_key_name])}'),
'authenticity_token' : encodeURIComponent('#{u(form_authenticity_token)}'),
}
});
Any thoughts? Thanks!