gofile

Module and tool to upload files to gofile.io
git clone https://code.alwayswait.ing/gofile.git
Log | Files | Refs

commit 0e863240900676a332671c0fac260210b4975a0a
parent 098756ab42b03ba67f455a449d3242edfbacb82a
Author: archiveanon <>
Date:   Sat, 28 Oct 2023 05:21:54 +0000

Support passing user token and folder ID for file upload

Diffstat:
Msrc/gofile/api.py | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/gofile/api.py b/src/gofile/api.py @@ -155,6 +155,10 @@ def main(): parser.add_argument("path", type=pathlib.Path, help="Path to single file or folder") parser.add_argument( + "--token", type=str, help="Token for user upload, or empty for initial anonymous upload" + ) + parser.add_argument("--folder-id", type=str, help="Folder to upload to") + parser.add_argument( "--fast-link", action="store_true", help="Uploads are queued in ascending size to get a download link as fast as possible", @@ -176,7 +180,7 @@ def main(): elif args.path.is_file(): files = [args.path] - uploads = upload_multiple(files) + uploads = upload_multiple(files, token=args.token, folder_id=args.folder_id) # force generator to evaluate and yield the first result first_upload = next(uploads)