# Replace text in string of variable

**URL:** <https://community.thunkable.com/t/replace-text-in-string-of-variable/3033738>\
**Category:** Questions about Thunkable X\
**Created:** [May 30, 2024, 7:51pm UTC](https://community.thunkable.com/t/replace-text-in-string-of-variable/3033738 "2024-05-30T19:51:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![infomw3qb](https://avatars.discourse-cdn.com/v4/letter/i/e5b9ba/32.png) [@infomw3qb](https://community.thunkable.com/u/infomw3qb)\
**Post date:** [May 30, 2024, 7:51pm UTC](https://community.thunkable.com/t/replace-text-in-string-of-variable/3033738/1 "2024-05-30T19:51:52Z")

</div>

![Screenshot 2024-05-30 214806](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/6/a60fce71af3d05960d3be31a7e024e316cf792b3.jpeg)

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 🙂

Kind regards,  
Dennis

---

<div class="post-metadata">

**Author:** ![matt\_conroy](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/matt_conroy/32/150843_2.png) [@matt\_conroy](https://community.thunkable.com/u/matt_conroy)\
**Post date:** [May 31, 2024, 1:32pm UTC](https://community.thunkable.com/t/replace-text-in-string-of-variable/3033738/2 "2024-05-31T13:32:34Z")

</div>

Hi infomw3qb, welcome to Thunkable! 🎉

Be sure to check out our posts about [How to ask Great Questions v2.0](https://community.thunkable.com/t/how-to-ask-great-questions-v2-0/2689983/1), our [Community Guidelines](https://community.thunkable.com/t/community-guidelines/78/8), and our [Docs](https://docs.thunkable.com/) 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:

 ![Screenshot 2024-05-31 at 9.31.33 AM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/4/3411fe1b8fe08f11e127e468db1bc7b3c0027f9d.png)

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?

---

<div class="post-metadata">

**Author:** ![infomw3qb](https://avatars.discourse-cdn.com/v4/letter/i/e5b9ba/32.png) [@infomw3qb](https://community.thunkable.com/u/infomw3qb)\
**Post date:** [June 4, 2024, 3:52pm UTC](https://community.thunkable.com/t/replace-text-in-string-of-variable/3033738/3 "2024-06-04T15:52:11Z")

</div>

Hi Matt,

Thanks so much for your help. That worked! 🙂

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](https://support.cloudinary.com/hc/en-us/articles/202520362-Can-Cloudinary-s-imaged-be-served-via-SSL-HTTPS) 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. 🙂

Kind regards,  
Dennis

 ![Cloudinary1](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/d/4dfc3a564bf1b016f62e161a2506d060212351a2.jpeg)  
 ![Output](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/a/3ab961aede0990a9436f39ebbbe4c592a7c22803.jpeg)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [September 2, 2024, 3:52pm UTC](https://community.thunkable.com/t/replace-text-in-string-of-variable/3033738/4 "2024-09-02T15:52:55Z")

</div>

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