Repository navigation
browser: creating download manager delegate to handle downloads - #2030
Merged
Merged
Conversation
Contributor
|
We may add But I wonder it's worthy adding this. Not sure whether it's a desirable feature that most developers need. |
Member
Author
Just so they can provide their own UI for download progress, or alteast get notifed of the downloads status. I am +1 on that api, will wait for others suggestion and get it as a separate PR. Thanks! |
Contributor
|
❤️ |
Contributor
|
and instead of the API @hokein suggested, how about type Progress = shape(
TotalBytes => float,
RecievedBytes => float
)
class Downloads{
static setSavePath(path: String): void
static download(path: String[, savePath: String]): Download
}
class Download extends EventEmitter{
savePath: String
onComplete(Callback: function(): void): void
onProgress(Callback: function(Progress): void): void
onAbort(Callback: function(hadError: bool): void): void
pause(): void
cancel()
} |
Contributor
There was a problem hiding this comment.
This condition should never be true.
deepak1556
force-pushed
the
file_download_patch
branch
from
June 23, 2015 12:24
25c4ac9 to
8f429bc
Compare
Contributor
|
👍 |
zcbenz
added a commit
that referenced
this pull request
Jun 23, 2015
browser: creating download manager delegate to handle downloads
Closed
|
I am +1 on download api, |
|
What do I have to do to get this? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1909
this basic implemetation provides ability to save downloads, the default download directory points to
Downloadsfolder in the respective app. We can provide api around this for users track status of each download by adding observers to this class, it deserves a separate PR. Thoughts ?