-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
Description
Hi, this is my controller:
var uploader = $scope.uploader = $fileUploader.create({
scope: $scope,
url: '/doUpload',
formData: [
{
key: 'value',
izena:''
}
]
});
What I need is to include a new field called "izena" where I have my upload path and more data.
This is all the stuff I tried on "beforeupload" event:
uploader.bind('beforeupload', function (event, item) {
console.info('Before upload', item);
var temp_izena = items[0].file.name;
var izena = temp_izena.substr(0, temp_izena.lastIndexOf('.'));
izena = izena + datuGuztiak;
$('#izena').val(izena);
$('#izena').text(izena);
uploader.formData.push({ izena: izena });
uploader.formData.izena = "jejejjejej";
item.izena = "jajajjaj";
});
but it is not working.. I can not see this param on my request on node.js
Whitch is the correct way to add new fields to upload?
thanks in advance