javascript - How to change Header Parameters while using angular-file-upload for uploading multiple files -


i have requirement add file name in header while uploading each file. using single uploader selecting multiple files. tried doing

 $scope.uploader.onafteraddingfile = function (fileitem) {        $scope.uploader.headers.filename = fileitem.name;  }; 

but not changing. can please help?

try this:

$scope.uploader.queue[$scope.uploader.queue.length - 1].file.name = "prefix-" + fileitem.file.name; 

Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -