# Upload List of Images through Data API

**URL:** <https://forum.bubble.io/t/upload-list-of-images-through-data-api/333114>\
**Category:** Questions\
**Created:** [July 29, 2024, 2:10pm UTC](https://forum.bubble.io/t/upload-list-of-images-through-data-api/333114 "2024-07-29T14:10:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bart.gommers](https://avatars.discourse-cdn.com/v4/letter/b/b19c9b/32.png) [@bart.gommers](https://forum.bubble.io/u/bart.gommers)\
**Post date:** [July 29, 2024, 2:10pm UTC](https://forum.bubble.io/t/upload-list-of-images-through-data-api/333114/1 "2024-07-29T14:10:32Z")

</div>

I’m trying to upload images generated and saved in my Google Drive through the data API into my bubble database. For PDFs (files) this works through base64 encoding.

For images it should work through a direct link (  
[https://drive.google.com/uc?export=download&id=XXX](https://drive.google.com/uc?export=download&id=XXX)). The link is sent into the database, gets accepted, but cannot be previewed.

I need it to be of data type Image in order to view it in a carousel.

How can I make this work?

---

<div class="post-metadata">

**Author:** ![Jici](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jici/32/30722_2.png) [@Jici](https://forum.bubble.io/u/Jici)\
**Post date:** [July 29, 2024, 2:21pm UTC](https://forum.bubble.io/t/upload-list-of-images-through-data-api/333114/2 "2024-07-29T14:21:38Z")

</div>

If you want to upload a file (to Bubble storage), you need to encode it in base64 and set the json as:

```auto
{
 "filename": "String"
 "contents": "Base64-encoded binary data"
 "private": Boolean
 "attach_to": "String"
}

```

An option if you cannot do that, is to use Backend WF instead. Send the URL and in the field, use url’saved to Bubble storage (I think they renamed it two weeks ago, before it was Saved to s3)

---

<div class="post-metadata">

**Author:** ![bart.gommers](https://avatars.discourse-cdn.com/v4/letter/b/b19c9b/32.png) [@bart.gommers](https://forum.bubble.io/u/bart.gommers)\
**Post date:** [July 29, 2024, 2:32pm UTC](https://forum.bubble.io/t/upload-list-of-images-through-data-api/333114/3 "2024-07-29T14:32:14Z")

</div>

awesome, thanks very much. Will have a look into the backend workflow

---

<div class="post-metadata">

**Author:** ![bart.gommers](https://avatars.discourse-cdn.com/v4/letter/b/b19c9b/32.png) [@bart.gommers](https://forum.bubble.io/u/bart.gommers)\
**Post date:** [July 29, 2024, 2:49pm UTC](https://forum.bubble.io/t/upload-list-of-images-through-data-api/333114/4 "2024-07-29T14:49:25Z")

</div>

@Jici this saves them in the database as a File instead of an Image, right?

---

<div class="post-metadata">

**Author:** ![Jici](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jici/32/30722_2.png) [@Jici](https://forum.bubble.io/u/Jici)\
**Post date:** [July 29, 2024, 2:55pm UTC](https://forum.bubble.io/t/upload-list-of-images-through-data-api/333114/5 "2024-07-29T14:55:38Z")

</div>

No. you can choose if this is a file or image type in Backend WF and save it to image field. The option 's saved to Bubble should be available for both type
