# \[NEW PLUGIN\] Convert File URL to Base64 string

**URL:** <https://forum.bubble.io/t/new-plugin-convert-file-url-to-base64-string/208670>\
**Category:** Plugins\
**Created:** [May 27, 2022, 1:20pm UTC](https://forum.bubble.io/t/new-plugin-convert-file-url-to-base64-string/208670 "2022-05-27T13:20:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![blurapps](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/blurapps/32/102380_2.png) [@blurapps](https://forum.bubble.io/u/blurapps)\
**Post date:** [May 27, 2022, 1:20pm UTC](https://forum.bubble.io/t/new-plugin-convert-file-url-to-base64-string/208670/1 "2022-05-27T13:20:19Z")

</div>

This came up while I was trying to send emails with attachments in the Gmail API. The attached files are expected as base64 encoded strings along with their content type (eg: image/png). Rather than use the Gmail library on Bubble, I decided to make this possible to do with only the API connector.

This Plugin will **take a file url** (compatible with the File URL returned from FileUploader’s value’s URL) so you can hook it up with a file uploader or image uploader directly in your Bubble app. And it **returns the full base64 string** along with just the file as base64 string and the content type as element states. More instructions are on the plugin page.

Plugin Page: [File URL to Base64 Plugin | Bubble](https://bubble.io/plugin/file-url-to-base64-1653645972850x203266694854213630)  
Implemented in run-mode: [https://blur-apps-playground.bubbleapps.io/version-test/file\_to\_base64](https://blur-apps-playground.bubbleapps.io/version-test/file_to_base64)  
Try it on the Editor: [Blur-apps-playground | Bubble Editor](https://bubble.io/page?type=page&name=file_to_base64&id=blur-apps-playground&test_plugin=1653645972850x203266694854213630_current&tab=tabs-1)

Hope this helps!

---

<div class="post-metadata">

**Author:** ![blurapps](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/blurapps/32/102380_2.png) [@blurapps](https://forum.bubble.io/u/blurapps)\
**Post date:** [June 15, 2022, 5:56am UTC](https://forum.bubble.io/t/new-plugin-convert-file-url-to-base64-string/208670/2 "2022-06-15T05:56:17Z")

</div>

[UPDATE]

I’ve added a functionality via WF action to take a file as base64 string and store it on your app’s File Manager as well as return the URL as a string for client-side use. Check it out!

---

<div class="post-metadata">

**Author:** ![jsterling](https://avatars.discourse-cdn.com/v4/letter/j/76d3ee/32.png) [@jsterling](https://forum.bubble.io/u/jsterling)\
**Post date:** [August 30, 2023, 3:28pm UTC](https://forum.bubble.io/t/new-plugin-convert-file-url-to-base64-string/208670/3 "2023-08-30T15:28:22Z")

</div>

Looks great, but am I correct that this only operates client-side? Will it function in a backend workflow?

---

<div class="post-metadata">

**Author:** ![orka](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/orka/32/187082_2.png) [@orka](https://forum.bubble.io/u/orka)\
**Post date:** [September 20, 2023, 1:12pm UTC](https://forum.bubble.io/t/new-plugin-convert-file-url-to-base64-string/208670/4 "2023-09-20T13:12:34Z")

</div>

hey! how oculd i make it work on a list of things? if thel ist has one item it works perrfectly, but if it has 2 or more it just doesn’t. even if a go through each item at one with current index.
