Message from JavaScript discussions

November 2020

— I have my file downloaded to my machine from the browser

— 

Now I dont want the file downloaded but need it as base64 or if possible as xlsx file so I can save to cloudinary

— So you want a buffer, yeah?

— Is it called buffer? base64 is what cloudinary supports anyways

— If you have a buffer you can do .toString('base64') or something

— For real??

— function s2ab(s) {
var buf = new ArrayBuffer(s.length); //convert s to arrayBuffer
var view = new Uint8Array(buf); //create uint8array as viewer
for (var i = 0; i < s.length; i++) view[i] = s.charCodeAt(i) & 0xFF; //convert to octet
return buf;
}

Message permanent page

— Seems the above function returned buffer. What do you think

— Wut is s

— S is wbout from here ☝🏻

— What is wbout

— Check the equation I quoted mike