I am trying to pass an authenticity_token as part of the scriptData option to the uploadify function (using the brand new 2.0 release). So, this is the javascript I end up with
- Code: Select all
$(document).ready(function(){
$('#uploadify').uploadify({
'uploader' : '/flash/uploadify.swf',
'script' : '/asset',
'cancelImg' : '/images/cancel.png',
'fileDataName' : 'asset[asset]',
'scriptData' : {
'authenticity_token' : 'R4%2BOZiOjf8XoHDzkPM1rY7yKb%2B1QUnM6XUPfS7GU2r0%3D'
},
'auto' : true,
'multi' : true,
'fileExt' : '*.jpg;*.pdf;*.eps;*.tiff'
});
});
Notice that the authenticity_token is already url encoded. So, the %2B and the %3D are + and = symbols. However, what I see on my server side after trying to upload a file is:
- Code: Select all
"authenticity_token"=>"R4 OZiOjf8XoHDzkPM1rY7yKb 1QUnM6XUPfS7GU2r0="
The + signs are now spaces. Any ideas?
