# How to save an image from an external URL into the Bubble database

**URL:** <https://forum.bubble.io/t/how-to-save-an-image-from-an-external-url-into-the-bubble-database/81353>\
**Category:** Database\
**Created:** [March 9, 2020, 8:59am UTC](https://forum.bubble.io/t/how-to-save-an-image-from-an-external-url-into-the-bubble-database/81353 "2020-03-09T08:59:55Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![sohaan\_gd](https://avatars.discourse-cdn.com/v4/letter/s/439d5e/32.png) [@sohaan\_gd](https://forum.bubble.io/u/sohaan_gd)\
**Post date:** [March 9, 2020, 8:59am UTC](https://forum.bubble.io/t/how-to-save-an-image-from-an-external-url-into-the-bubble-database/81353/1 "2020-03-09T08:59:55Z")

</div>

Hello, I have an api integration where external api gives an image URL which is temporary on their server so I would like to have them saved into bubble database permanently. How do I do this? At the moment its only saving the URL and not the file, so after 2 days these urls saved on my db become empty.

---

<div class="post-metadata">

**Author:** ![manikandan](https://avatars.discourse-cdn.com/v4/letter/m/3da27b/32.png) [@manikandan](https://forum.bubble.io/u/manikandan)\
**Post date:** [March 9, 2020, 11:30am UTC](https://forum.bubble.io/t/how-to-save-an-image-from-an-external-url-into-the-bubble-database/81353/3 "2020-03-09T11:30:21Z")

</div>

User SavetoS3 while saving the external image path to the database table. it will directly save the external file url to S3.

---

<div class="post-metadata">

**Author:** ![sohaan\_gd](https://avatars.discourse-cdn.com/v4/letter/s/439d5e/32.png) [@sohaan\_gd](https://forum.bubble.io/u/sohaan_gd)\
**Post date:** [March 9, 2020, 3:41pm UTC](https://forum.bubble.io/t/how-to-save-an-image-from-an-external-url-into-the-bubble-database/81353/4 "2020-03-09T15:41:38Z")

</div>

Not sure I understood, could you please explain again or maybe paste images from the workflow? when I do save to s3, all it does is save the same url and not the file.

---

<div class="post-metadata">

**Author:** ![manikandan](https://avatars.discourse-cdn.com/v4/letter/m/3da27b/32.png) [@manikandan](https://forum.bubble.io/u/manikandan)\
**Post date:** [March 10, 2020, 3:52am UTC](https://forum.bubble.io/t/how-to-save-an-image-from-an-external-url-into-the-bubble-database/81353/5 "2020-03-10T03:52:44Z")

</div>

![image](https://us1.discourse-cdn.com/bubble/original/3X/2/8/283c0e601f416c19a4fc7e819560421d4cb30991.png)  
Hope this will help you.

---

<div class="post-metadata">

**Author:** ![sohaan\_gd](https://avatars.discourse-cdn.com/v4/letter/s/439d5e/32.png) [@sohaan\_gd](https://forum.bubble.io/u/sohaan_gd)\
**Post date:** [March 10, 2020, 6:50am UTC](https://forum.bubble.io/t/how-to-save-an-image-from-an-external-url-into-the-bubble-database/81353/6 "2020-03-10T06:50:27Z")

</div>

I did the same and yet, the change made has the same image source which is the temporary link from the api of external image. Also, in your case, its inputA’s value, here probably you have input a dynamic image url. Maybe it works in this use case but in mine, im not uploading an image via image uploader, I have a workflow where the image is received from Api using Action and then the url from response data is saved to a thing, I then did a make changes to the same thing with added :saved to s3. Didnt seem to work.

---

<div class="post-metadata">

**Author:** ![manikandan](https://avatars.discourse-cdn.com/v4/letter/m/3da27b/32.png) [@manikandan](https://forum.bubble.io/u/manikandan)\
**Post date:** [March 10, 2020, 6:51am UTC](https://forum.bubble.io/t/how-to-save-an-image-from-an-external-url-into-the-bubble-database/81353/7 "2020-03-10T06:51:45Z")

</div>

Yes, i understand your case. This was work for API too. Already i have workedout.  
Please share your app editor.  
i will let you know.

---

<div class="post-metadata">

**Author:** ![sohaan\_gd](https://avatars.discourse-cdn.com/v4/letter/s/439d5e/32.png) [@sohaan\_gd](https://forum.bubble.io/u/sohaan_gd)\
**Post date:** [April 28, 2020, 12:41pm UTC](https://forum.bubble.io/t/how-to-save-an-image-from-an-external-url-into-the-bubble-database/81353/8 "2020-04-28T12:41:10Z")

</div>

Thanks a ton, it worked 🙂

---

<div class="post-metadata">

**Author:** ![klaas.vanhoeck1](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/klaas.vanhoeck1/32/47671_2.png) [@klaas.vanhoeck1](https://forum.bubble.io/u/klaas.vanhoeck1)\
**Post date:** [May 15, 2020, 9:13pm UTC](https://forum.bubble.io/t/how-to-save-an-image-from-an-external-url-into-the-bubble-database/81353/9 "2020-05-15T21:13:57Z")

</div>

How did you do it? I did the same steps as you, creating a file and afterwards using the saved to s3 function. It didn’t work. Can you help me out?

---

<div class="post-metadata">

**Author:** ![sohaan\_gd](https://avatars.discourse-cdn.com/v4/letter/s/439d5e/32.png) [@sohaan\_gd](https://forum.bubble.io/u/sohaan_gd)\
**Post date:** [May 16, 2020, 12:34pm UTC](https://forum.bubble.io/t/how-to-save-an-image-from-an-external-url-into-the-bubble-database/81353/10 "2020-05-16T12:34:42Z")

</div>

So in my case, I have an API that gives me back images, so first step I do is CREATE

![image](https://us1.discourse-cdn.com/bubble/original/3X/5/5/55fd8278b74ee462de68eb95c03fc4e842c3f9f8.png)

In this, I simply save the URL

![image](https://us1.discourse-cdn.com/bubble/original/3X/5/a/5ac7529b3a25176fdc552b9aec63f8a3d6367117.png)

next step is I make changes to Result of step 1 which is CREATE

![image](https://us1.discourse-cdn.com/bubble/original/3X/d/f/df25ba210eaeefeb29c3c115984c1990f6c908a7.png)

Here I add saved to s3.

I hope the images make it easy for you to understand.

Feel free to ask if you still have any doubt.

Cheers 🙂

---

<div class="post-metadata">

**Author:** ![klaas.vanhoeck1](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/klaas.vanhoeck1/32/47671_2.png) [@klaas.vanhoeck1](https://forum.bubble.io/u/klaas.vanhoeck1)\
**Post date:** [May 16, 2020, 12:50pm UTC](https://forum.bubble.io/t/how-to-save-an-image-from-an-external-url-into-the-bubble-database/81353/11 "2020-05-16T12:50:54Z")

</div>

Thanks for your answer. However, it doesn’t work for me. So I have the same setup as you

 ![Screenshot 2020-05-16 at 14.47.44](https://us1.discourse-cdn.com/bubble/original/3X/a/0/a0ec9f9be526dc12232356e6c38b1fadeed7b150.png) ![Screenshot 2020-05-16 at 14.47.49](https://us1.discourse-cdn.com/bubble/original/3X/5/7/57bdc209126caf3f3bc763d8a97bd71bcea9083c.png)

But the URL stays the same. The first image is the URL where the image is saved. The second image, the URL of “afbeelding” should be an s3 URL i guess with my setup, but it isn’t.

![Screenshot 2020-05-16 at 14.47.59](https://us1.discourse-cdn.com/bubble/original/3X/6/d/6d30c9cebeee675d7148ba5247b7124d3f638647.png)

 ![Screenshot 2020-05-16 at 14.48.24](https://us1.discourse-cdn.com/bubble/original/3X/2/8/285b64a29cdc043d22b652e91a7c7371fd82043e.png)

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![sohaan\_gd](https://avatars.discourse-cdn.com/v4/letter/s/439d5e/32.png) [@sohaan\_gd](https://forum.bubble.io/u/sohaan_gd)\
**Post date:** [May 16, 2020, 1:13pm UTC](https://forum.bubble.io/t/how-to-save-an-image-from-an-external-url-into-the-bubble-database/81353/12 "2020-05-16T13:13:56Z")

</div>

No, dont check it here, this is the same mistake I did too, go to your database where this image is saved and click the see button, this will open the image in a new tab and then check the link in the url of this tab, if it has s3bucket in it then its successful.

![image](https://us1.discourse-cdn.com/bubble/original/3X/2/b/2b3be5f876125ff1151f5a13cc674b2b5705d99a.png)

This is exactly where you should check the link and is technically the actual link to your image that is saved.

---

<div class="post-metadata">

**Author:** ![klaas.vanhoeck1](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/klaas.vanhoeck1/32/47671_2.png) [@klaas.vanhoeck1](https://forum.bubble.io/u/klaas.vanhoeck1)\
**Post date:** [May 16, 2020, 1:16pm UTC](https://forum.bubble.io/t/how-to-save-an-image-from-an-external-url-into-the-bubble-database/81353/13 "2020-05-16T13:16:19Z")

</div>

When i check it in my database it remains the old url, not the s3 bucket. Strange…

---

<div class="post-metadata">

**Author:** ![sohaan\_gd](https://avatars.discourse-cdn.com/v4/letter/s/439d5e/32.png) [@sohaan\_gd](https://forum.bubble.io/u/sohaan_gd)\
**Post date:** [May 16, 2020, 1:18pm UTC](https://forum.bubble.io/t/how-to-save-an-image-from-an-external-url-into-the-bubble-database/81353/14 "2020-05-16T13:18:03Z")

</div>

did you see this link on the new tab that gets opened when you click the image ?

---

<div class="post-metadata">

**Author:** ![sohaan\_gd](https://avatars.discourse-cdn.com/v4/letter/s/439d5e/32.png) [@sohaan\_gd](https://forum.bubble.io/u/sohaan_gd)\
**Post date:** [May 16, 2020, 1:19pm UTC](https://forum.bubble.io/t/how-to-save-an-image-from-an-external-url-into-the-bubble-database/81353/15 "2020-05-16T13:19:04Z")

</div>

![image](https://us1.discourse-cdn.com/bubble/original/3X/c/7/c75447d77f88630566afaa793decaa01b3062238.png)

in this step maybe also add image B’svalue’s url and try

---

<div class="post-metadata">

**Author:** ![klaas.vanhoeck1](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/klaas.vanhoeck1/32/47671_2.png) [@klaas.vanhoeck1](https://forum.bubble.io/u/klaas.vanhoeck1)\
**Post date:** [May 16, 2020, 1:19pm UTC](https://forum.bubble.io/t/how-to-save-an-image-from-an-external-url-into-the-bubble-database/81353/16 "2020-05-16T13:19:16Z")

</div>

Yes, still the old url.

 ![Screenshot 2020-05-16 at 15.18.26](https://us1.discourse-cdn.com/bubble/original/3X/2/2/2276800894e3208fb8637ee1bbc1cc87e5fb47a5.jpeg)

---

<div class="post-metadata">

**Author:** ![sohaan\_gd](https://avatars.discourse-cdn.com/v4/letter/s/439d5e/32.png) [@sohaan\_gd](https://forum.bubble.io/u/sohaan_gd)\
**Post date:** [May 16, 2020, 1:34pm UTC](https://forum.bubble.io/t/how-to-save-an-image-from-an-external-url-into-the-bubble-database/81353/17 "2020-05-16T13:34:10Z")

</div>

Not sure why this is happening. I checked my workflows and there is nothing different im doing, its working for me.

---

<div class="post-metadata">

**Author:** ![sidpillai91](https://avatars.discourse-cdn.com/v4/letter/s/d26b3c/32.png) [@sidpillai91](https://forum.bubble.io/u/sidpillai91)\
**Post date:** [March 12, 2021, 12:36pm UTC](https://forum.bubble.io/t/how-to-save-an-image-from-an-external-url-into-the-bubble-database/81353/18 "2021-03-12T12:36:32Z")

</div>

Is it possible to specify a header such as an authorization Bearer token for the URL? For my use case, the external URL with the content requires a Bearer token: 'Authorization: Bearer ’

If this is not possible, is there an alternative method for saving an image from an external URL into the Bubble database which would allow specifying such a header?

---

<div class="post-metadata">

**Author:** ![donatien](https://avatars.discourse-cdn.com/v4/letter/d/bc79bd/32.png) [@donatien](https://forum.bubble.io/u/donatien)\
**Post date:** [September 12, 2022, 2:40pm UTC](https://forum.bubble.io/t/how-to-save-an-image-from-an-external-url-into-the-bubble-database/81353/19 "2022-09-12T14:40:22Z")

</div>

In my case, it worked.  
I dit a GET a request with the API Plugin to the image url  
Notice : I used an API workflow only because I needed to do this on a list of images. For a single image, this could have been done in front

 ![Step1](https://us1.discourse-cdn.com/bubble/original/3X/b/1/b10ef6b9eeb944d9e694ad6795fe545a182c3846.png)  
 ![Step2](https://us1.discourse-cdn.com/bubble/original/3X/4/c/4c3466640f3953dfe66db6bbe5fe5815c1e6ee14.png)

---

<div class="post-metadata">

**Author:** ![joemanier](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/joemanier/32/188803_2.png) [@joemanier](https://forum.bubble.io/u/joemanier)\
**Post date:** [April 17, 2023, 9:22pm UTC](https://forum.bubble.io/t/how-to-save-an-image-from-an-external-url-into-the-bubble-database/81353/20 "2023-04-17T21:22:23Z")

</div>

Amazing, got me over the hump on a problem, thank you!

---

<div class="post-metadata">

**Author:** ![bijay.koirala](https://avatars.discourse-cdn.com/v4/letter/b/ecccb3/32.png) [@bijay.koirala](https://forum.bubble.io/u/bijay.koirala)\
**Post date:** [March 28, 2024, 6:42pm UTC](https://forum.bubble.io/t/how-to-save-an-image-from-an-external-url-into-the-bubble-database/81353/21 "2024-03-28T18:42:32Z")

</div>

Awesome. This worked perfectly.
