Hi
I've deployed the TSImageUploadControl code from github as per the instructions.
https://github.com/microsoft/PowerApps-Samples/tree/master/component-framework/TS_ImageUploadControl
The upload is working fine. However the default image is not being set. I'm getting the error "Image not found" in this line.
this._context.resources.getResource(DefaultImageFileName, this.setImage.bind(this, false, "png"), this.showError.bind(this));
private setDefaultImage():void
{
this._context.resources.getResource(DefaultImageFileName, this.setImage.bind(this, false, "png"), this.showError.bind(this));
this.controlContainer.classList.add(NoImageClassName);
// If it already has value, we need to update the output
if(this._context.parameters.value.raw)
{
this._value = null;
this._notifyOutputChanged();
}
}
After the call to getResource, the error function showError is called which displays the image not found message. The image default.png is in the "img" folder. I've tried to debug in developer tools, however I'm unable to find the actual exception that is thrown by getResource. Are you able to help?
Thanks