Message from JavaScript discussions

November 2020

— Does it work?

— 

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;
}
FileSaver.saveAs(new Blob([s2ab(wbout)], { type: "application/octet-stream" }), title+'.xlsx')

— Can you see how the wbout is used

— Alright

— I would think XLSX was streaming?

— My goal is to save the generated file to cloudinary without downloading it first to my local machine

— Cloudinary supports base64 but I am not sure what my code is given me but it shows binary

— It's probably not base64

— Any better approach

— I just want to pass raw to cloudinary and get working link

— Is this a browser or node

— Node pls