I have this requirement to add file name in header while uploading each file. I am using a single uploader for selecting multiple files. I tried doing this
$scope.uploader.onAfterAddingFile = function (fileItem) {
$scope.uploader.headers.fileName = fileItem.name;
};
But its not changing. Can anyone please help?
Try with this:
$scope.uploader.queue[$scope.uploader.queue.length - 1].file.name = "prefix-" + fileItem.file.name;