== Using Rails3 with uploadify
Add this to 'scriptData' in js (which is loading uploadify)
'_maxhost_upload': $('meta[name=cses]').attr('content')
And this to yours application layout
%meta{ :name => "cses", :content => cookies["_xyz"]}
where _xyz is Yours session cookie key.