fix image download
This commit is contained in:
parent
d6a473f6e9
commit
18f159696b
@ -158,6 +158,12 @@ class Services {
|
||||
var elem = document.getElementById("revoke") as HTMLAnchorElement;
|
||||
if (elem != null) {
|
||||
let imageWithData = services.sdkClient.add_data_to_image(imageBytes, revokeData, true);
|
||||
const blob = new Blob([imageWithData], { type: 'image/jpeg' });
|
||||
const url = URL.createObjectURL(blob);
|
||||
|
||||
// Set the href attribute for download
|
||||
elem.href = url;
|
||||
elem.download = 'revoke_4NK.jpg';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user