Replace text in string of variable

Hi guys,

The users of my app should be allowed to take a photo, which will then be sent to an API for analysis, to send them back its response.

Now for some reason, when I:

set ‘app variable imageURL’ to url from uploaded file ‘photo’

I get the URL of the file as http:// from Cloudinary.

I would need it to be https:// though.

So I tried to replace the http:// in the return from Cloudinary with https:// (see screenshot attached), but it doesn’t work.

What am I doing wrong?

Looking forward to your answers and hopefully learning something new :slight_smile:

Kind regards,
Dennis

Hi infomw3qb, welcome to Thunkable! :tada:

Be sure to check out our posts about How to ask Great Questions v2.0, our Community Guidelines, and our Docs as you get started.

For setting the variable teststring, you’ll want to just use the set variable block and not the set app variable as those are made for dynamic variables. I was able to get your desired result by updating to the blocks below:

However, I am also curious about Cloudinary using http. This should not be, their share links all begin with https from what I can see. Can you share one of the links?

Hi Matt,

Thanks so much for your help. That worked! :slight_smile:

Regarding Cloudinary, I had the logic built without the replacement (as shown in the attachment) so that it would display the link that gets returned and it shows me the URL as http:// for some reason.

Upon searching, I found this article posted by them.

But maybe I’m doing something wrong. I’m a Newbie to all of this.

What I’m trying to do is to have the user take or select a picture which then gets sent to a Lambda function on an AWS API where I add the secret key to access yet another API. It works when I test it with sample data on AWS, but I need to get the connection to my app.Hopefully it will work now. :slight_smile:

Kind regards,
Dennis


Output

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