How to convert JS Audio Blob to Binary Data

I have been using the below components from the forge:

In attempts to create a reactive web app that will allow the user to record audio from their microphone. I would then like to express this recorded audio as Binary Data within outsystems so that I can use this component:
To upload that recorded audio to an S3 Bucket.

At the moment, the recorded audio is stored as a blob in JS, and can only be expressed in Outsystems as an Object, which is no good to me. I need it to be a Binary Data variable.
If I try to output the JS blob into a Binary Data variable, the variable seems to contain some data but can't be used by Outsystems actions (i.e. If I try to store the Binary Data in a database, a new record will be created but the data itself is not written to the db).

I've also attempted to implement my own version of the plugin using RecordRTC, and again get to the point where I have a JS blob that contains my recording, and I cant convert it to something useful to me.

Any help would be greatly appreciated, thank you.

Rank: #17

Hi Bryce,

Maybe the following component can help to convert your blob to base64 and from there to binary?




Rank: #4338

Hey Daniël,

Thank you for your suggestion! That ended up working perfectly!
I initially had some difficulty getting the Base64 string out of my JS node due to some scoping issues, but after I managed to get it out and removed the preamble from the start of the Base64 string, it all worked perfectly!
Thank you again for your time, I greatly appreciate it!

Rank: #690

Bryce - I am trying to do a very similar thing. Any chance you would share a screenshot of your javascript and your OutSystems flow to make this work?

Thanks so much!