I want to upload files to Google Drive with Google Script and Python.
I don't want to do this with API because it's with JSON file and requesting a password to google account.
I want to send from the Python file without a JSON file and without requesting a google account.
I want to create a script in google script that will upload the file to the site.
I found how to do it with html:
function saveFile(data,name,folderName) {
var contentType = data.substring(5,data.indexOf(';'));
var file = Utilities.newBlob(
Utilities.base64Decode(data.substr(data.indexOf('base64,')+7)),
contentType,
name
); //does the uploading of the files
DriveApp.getFolderById(childFolderIdA).createFile(file);
}
But I did not find how to do it with python.
How do I send file with file to this code?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…