Hope it all worked out for you? I had a bit of a glitch today with the Base64 stuff.
I was trying to encode and upload a bit of content from an HTML editor (SunEditor) and it creates data I guess that is not just ascii characters when embedding images. Or at least it does sometimes because it was working before. But today, Window.btoa failed with an error about not being able to encode characters outside of the Latin1 range. So I added js-base 64:
<script src="https://cdn.jsdelivr.net/npm/js-base64@latest/base64.js"></script>
And then use
asm
SendFile = Base64.encode( sourcefile );
end;
and it works as it did previously.