Upload a file to Google Drive
Upload a file into a Google Drive folder, or into My Drive when no folder is given. Pass the bytes inline as base64 for small files, or point fileUrl at the file served over http://127.0.0.1:<port>/ on the machine running the browser for larger ones. Before reporting success it waits for a row in the destination that was absent beforehand AND carries this call's own filename, so it cannot credit itself with a file another upload created; it returns that file's Drive id. A filename already present in the destination is refused up front, because a dropped file does NOT replace or get declined — Drive happily stores a second, separate file under the same name. For the same reason a lost upload is reported as a failure rather than retried: a re-drop would duplicate an upload that merely landed slowly.
List a Google Drive folder
List the files and sub-folders directly inside a Google Drive folder, without recursing or downloading anything. Returns each item's id, name, type, size, last-modified date, owner and link. Omit folderId to list My Drive's root.