Hey,
I have been wanting to check and see if a file exists in firebase Storage
but according to documentation only way to do is to check for exceptions.
But Firebase doesn't seem to obey that . i tried the following code
it is not goiing into either of if statements nor is it reporting a error
try
{
bookImageRef.GetDownloadUrlAsync().ContinueWith(task =>
{
Debug.Log(task.Result);
if (task.IsFaulted
|| task.IsCanceled)
{
Debug.LogError("Download URL: " + task.Result);
// use default.png
// ... now download the file via WWW or UnityWebRequest.
}
else if (task.IsCompleted)
{
Debug.Log("Download URL: " + task.Result);
// GetBookImageFromDB(Productcode, out _image, ImageDownloadLocDetails.DownloadDefault);
}
});
how do I catch the error so I can check if the image exists and perform a particular function if it does and another if it doesnt
Please feel free to let me know if you found it hard to understand my query
Thanks & regards