flowjs / ng-flow

Flow.js html5 file upload extension on angular.js framework
http://flowjs.github.io/ng-flow/
MIT License
1.38k stars 303 forks source link

How to resume upload after destroyed directive? #347

Open quangvinh1305 opened 6 years ago

quangvinh1305 commented 6 years ago

Dear all, I have an issue when i click on pause button. Then i minimize ng-flow directive and resume it with the pausedFlow instance variable i saved it in fileSrv and reinitialize flow-name="fileSrv.pausedFlow" . I can't see the file i paused.

djechelon commented 6 years ago

That's not exactly how pause works. Chunked uploading is what allows you to handle resumable downloads server side.

If you remove the directive your client-side upload session is killed as well, the pending chunks are still stored on the server if you don't notify anything.

So normally you would have to restart the file upload and Flow will poll the server to detect at which point to resume upload.

Indeed, you may want to clarify how you actually "minimize" ng-flow.