How to retrieve url from cloudinary?

Hi
I have create a screen to upload picture to cloudinary on a click of button and retrieve to url and show it on image preivew. On the clik the image gets uploaded byt the url returned in empty. Why is it happening? Please help.

@bincyoommen2022rdsvx
Please recheck your Cloudinary credentials once more, as they are the most important.
So, i think the error is in your code, see this pic


You have added does link contain **a blank character**
And think youself, suppose a link xyz is returned or anything else, it will be a string or a normal text, so it will always contain a blank charcter, because blank charcter is always present in a text, (note - here i am not talking about blank space-> ( ), i am talking about blank character β†’ ())
Second, this is my suggestion to you to: why are you adding this condition, i think you are trying to check whether the image is uploaded corretly or not or you want to check whether the user uploaded the image or canceled it, am I right?
So, you can add this condition instead of that -

if app variable uploadlink = null

TIP - I think you don’t know, that if there is any issue in uploading a file to Cloudinary, then it returns null or any error, not a blank character like β†’ .

My opinion : if you are uploading a file to Cloudinary or using photo library of user, then use their advanced blocks, and handle the error and show it to user, because this is a type of bad code you are using, example:


I think you must got your answer, if yes, then please please mark this issue as solved.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.