I need to send file name and file size using uploadify. I DO NOT want to upload the file itself but only send file name and file size. I noticed that uploadify sends file name by default but does not send file size.I experimented using scriptData but it does not work. Here is my code:
$('#logical_item_upload').uploadify({
uploader : '/uploadify/uploadify.swf',
cancelImg : '/uploadify/cancel.png',
multi : true,
auto : true,
script : "<%=save_upload_logical_items_path%>",
onComplete : function(event, queueID, fileObj, response, data) {
var dat = eval('(' + response + ')');
$.getScript(dat.upload);},
scriptData : {
'_http_accept': 'application/javascript',
'format' : 'json',
'_method': 'post',
'user_id' : '<%= current_user.id %>'
}
});
I need something like following:
scriptData : {
'_http_accept': 'application/javascript',
'format' : 'json',
'_method': 'post',
'user_id' : '<%= current_user.id %>',
'file_size': file_size
}
How can I send just the file name and file size without uploading the file?