Forum Documentation Showcase Pricing Learn more

Save Base64 encoded file to Bubble

Hey everyone,

I have an API Workflow that returns a Base64 encoded audio file which I want to save to Bubble.

I can’t seem to find a way of decrypting the base64 down to a MP3 and saving it as part of a workflow, there are a few plugins but seem to be client side only.

Bubble seems to support encrypting to Base64 nativly but I’m a bit stuck for decrypting… if anyone has an idea of a solution would be great!

Thanks, James.

I’m attempting to write a new plugin to do this, I’ll release it back to the community if I can get it working.

I’m currently trying to get the following working as a server side action to decrypt the base64 string and return a file but it’s not working.

Does anyone have any suggestions what I might be doing wrong? :slight_smile:

function(properties, context) {
    return { 
        output: Buffer.from(properties.inputText.replace('data:audio/mp3; codecs=opus;base64,', ''), 'base64') 
    };
}

Hi @jamesdevonport,

I think that @lottemint.md Sergey can give you an help on that, as I will need it in the future also. In my case “application Octet/Stream” for a wav file didn’t work too.

1 Like

Hello @jamesdevonport,
As I understood, you are trying to save a file.

Take a look at the following link, please:

You need to send that content to an API workflow that is waiting for a file:
image

2 Likes

@JohnMark @lottemint.md Thanks both for the help on this, looks promising! I’ll have another go based on this and let you know how I get on :+1:

2 Likes

@JohnMark @lottemint.md Thanks so much, followed these steps and it works perfectly! No need for a plugin now I can do it all through API Workflows :smiley:

2 Likes