Upload a file to Google Drive
Input
filename requiredName to store the file under in Drive, including its extension. Must not already exist in the destination folder.
mime optionalContent type to store. Defaults to application/octet-stream, or whatever the server reports for a fileUrl.
fileUrl optionalURL the browser's own machine can fetch the file from, e.g. http://127.0.0.1:8765/clip.mp4 (python3 -m http.server 8765 in the file's directory). Mutually exclusive with fileBase64.
folderId optionalDestination folder id, i.e. the <id> in drive.google.com/drive/folders/<id>. Omit to upload into the root of My Drive.
fileBase64 optionalThe file's bytes, base64-encoded. Suits files up to roughly 96KB; use fileUrl above that. Mutually exclusive with fileUrl.
Output
fileId requiredDrive file id of the newly created file.
folderId requiredDestination folder, or "root" for My Drive.
uploaded requiredThe filename as Drive stored it.
verified requiredAlways named_row_appeared: a row absent from the folder before the upload AND bearing this call's own filename. The script fails rather than reporting an unconfirmed upload, and will not credit itself with a file another run created.
bytes optionalSize of the payload uploaded.
