Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function upload(file, attachableId, className, appName){
- var fd = new FormData();
- fd.append("file", file);
- return $http({
- method: 'POST',
- data: fd,
- url: URL+"?attachableId="+attachableId+"&className="+className+"&appName="+appName,
- headers: {'Content-Type': undefined},
- uploadEventHandlers: {
- progress : function(e){
- // I want to access the value of e.loaded in my directive each time it changes
- // so that I can update my progress bar
- console.log(e.loaded + " uploaded of " + e.total);
- }
- }
- })
- }
Add Comment
Please, Sign In to add comment