in client/src/pages/caption-image/caption-image.ts [74:94]
setImageData(image: Blob, imageURL: string | undefined) {
if (imageURL) {
validateImageURL(imageURL).then(
valid => {
if (valid) {
this.backgroundImageURL = imageURL;
} else {
URL.revokeObjectURL(imageURL);
this.setImageURL(URL.createObjectURL(image));
}
},
() => {
URL.revokeObjectURL(imageURL);
this.setImageURL(URL.createObjectURL(image));
}
);
} else {
this.setImageURL(URL.createObjectURL(image));
}
this.image = image;
}