You need to sign in to do that
Don't have an account?
sujin h s
Dynamic progress bar while downloading
I'm trying to download the element in the aura component as image & i'm successfull on it. So now i want to display a dynamic progress bar on clicking "Download" button & the size of the image is vary on time to time. Is it possible to do that?
My code to download image is:
saveImage: function(data){
var hiddenElement = document.createElement('a');
hiddenElement.href = 'data:image/jpg;base64,' + encodeURI(data);
hiddenElement.target = '_self';
hiddenElement.download = 'ExportImage.jpg';
document.body.appendChild(hiddenElement);
hiddenElement.click();
}
My code to download image is:
saveImage: function(data){
var hiddenElement = document.createElement('a');
hiddenElement.href = 'data:image/jpg;base64,' + encodeURI(data);
hiddenElement.target = '_self';
hiddenElement.download = 'ExportImage.jpg';
document.body.appendChild(hiddenElement);
hiddenElement.click();
}
You can use the code as mentioned in the below developer discussion,
https://salesforce.stackexchange.com/questions/102255/while-we-are-uploading-files-to-notes-attachments-i-want-to-show-the-progre
Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.
Thanks.