Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Conversation

@wesleycho
Copy link
Contributor

This is a rudimentary attempt at implementing file upload progress handling. However, I do not have a setup currently to test file uploading with Angular, so if someone else is able to get to it and report their findings when using this before I am able to create a setup, it would be much appreciated.

I want to generate feedback before I write tests for this new feature implementation, whether this is the right way to go.

To use this, one would do

$http.post('/file/upload/url', formData)
     .then(null, null, function(e) { 
       if (e.lengthComputable) console.log(e.loaded / e.total); 
     });

… $http via deferred.notify

Added $rootScope.$apply for notify callback
@wesleycho
Copy link
Contributor Author

Hm, I should have looked at #1236 first - just curious for transparency, what are the challenges with file upload specifically with respect to implementing it in the core?

@pkozlowski-opensource
Copy link
Member

@wesleycho / All interested in this PR: based on the discussion in #1934 (staring from here) it seems like the general trend is to remove notifications (at least in the current form) from promises. As such we don't want to solve the problem of progress notifications using promise APIs.

I'm going to close this PR (and similar ones: #3606, #5874, #9258) and focus on the callback-based solution instead (similar to the one proposed in #7995).

We still do appreciate your effort on this issue which seems to be important to many people - so if you care about progress notifications being available in AngularJS please let's have discussion in #7995.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants