Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] How can we get the download progress? #7

Open
nagubabu opened this issue Sep 13, 2019 · 1 comment
Open

[Feature request] How can we get the download progress? #7

nagubabu opened this issue Sep 13, 2019 · 1 comment

Comments

@nagubabu
Copy link

While downloading a file I want to show the progress in percentage(%) on the screen instead of showing it in the Notification UI. Please let me know if there is a way to do it or please add this feature if not there.

@lankesri
Copy link

@nagubabu , me unable to see any progress in percentage(%) on notification UI, can you please help me out to get it.
Please have a look here

var request = {
//Location of the resource to download
uri: url,
//Title of this download, to be displayed in notifications
title: 'Downloading',
//Description of this download, to be displayed in notifications
description: 'pdf download',
//This will override the content type declared in the server's response.
mimeType: '',
//Set whether this download should be displayed in the system's Downloads UI. True by default
visibleInDownloadsUi: true,
//Control when a system notification is posted by the download manager.
notificationVisibility: 0,
// Set the local destination to a path within the application's external files directory
/destinationInExternalFilesDir: {
dirType: 'Downloads',
subPath: '' //Path within the external directory, including the destination filename
},
/
//Set the local destination to a path within the application's public external storage directory
destinationInExternalPublicDir: {
dirType: 'Downloads',
subPath: '' //Path within the external directory, including the destination filename
},
//Set the local destination for the downloaded file.
//destinationUri: '',
//Additional HTTP headers to be included with the download request.
//headers: [{header: 'Authorization', value: 'Bearer iaksjfd89aklfdlkasdjf'}]
};

cordova.plugins.Downloader.download(request,
(location) => { alert('File is downloaded at' + location) },
(err) => { alert(err)})
thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants