Javascript list back into Bubble!

I encountered similar issue where I needed to send a JS array into Bubble’s closed framework.

Here’s a solution that worked great for me:

  1. In the second script you posted, make your var base64_images just an empty string var instead of an array.
  2. In the FOR loop, rather than pushing the base64 data, append it like so:
    base64_images += e.target.result + '#';
    You’ll end up with a long string of # tag separated base64 files.
  3. Pass it to JavascriptToBubble as a simple text
  4. In Bubble, use the expression JavacscriptToBubble C's value:extract with Regex where the Regex expression is [^#]+.
    The output of this expression will be a nice Bubble list of text containing the base64 data.

The # tag is used as a separator; it can be any character that is not part of the base64 table

By the way, you do not need to include , and tags in your HTML element since those are just a

in which you throw anything you want…

Hope this help