Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function saveFileJS(f) {
- console.log("arquivo: " + f);
- const file = f.files[0];
- const fr = new FileReader();
- fr.onload = function(e) {
- const obj = {
- filename: file.name,
- mimeType: file.type,
- bytes: [...new Int8Array(e.target.result)]
- };
- console.log("file: " + obj);
- console.log("nome do arquivo: " + obj.filename);
- //google.script.run.withSuccessHandler(e => console.log(e)).saveFile(obj,destino);
- return obj;
- };
- fr.readAsArrayBuffer(file);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement