Currently, I am utilizing the angular-file-upload library which can be found at this link: https://github.com/danialfarid/angular-file-upload. In the example provided on that page, data from a file is sent to the backend from a controller using the available directives.
In my implementation, I decided to move the file posting to a service. This approach would allow me to reuse the functionality and seems like the correct method (do you disagree?). Everything is functioning properly except for one issue - I am struggling to send the data from the .progress(function(evt)){}
function, which tracks file upload completion status, to the controller in order to display it on the HTML page.
It appears that I can retrieve the final success response using .then
, but what about this progress data?
Could there be a simple solution that I am overlooking? How should I go about achieving this task?