Sample CLI
gway vbox open-remote
Signature
(server_url: str = '[SERVER_URL]', *, path: str = 'vbox', email: str = '[ADMIN_EMAIL]')
Docstring
Create a vbox on a remote system, retrieve the upload link from email, and store it locally.
- server_url: Base URL of the remote server (e.g., 'https://example.com')
- path: Path on remote server where vbox upload is handled (default 'vbox')
- email: Email address to receive the upload link (should be accessible by local mail.search)
Returns: dict of stored record fields, or None if unsuccessful.
Sample CLI
gway vbox periodic-purge
Signature
(*, seconds=120)
Docstring
Background thread to periodically purge expired upload boxes.
Sample CLI
gway vbox poll-remote
Signature
(server_url: str = '[SERVER_URL]', *, target='work/vbox/remote', interval=3600)
Docstring
Poll the remote vbox for files and download new/updated ones to the local target directory.
- server_url: Remote GWAY instance base URL
- target: Local directory to save downloaded files
- interval: Seconds between polls (runs forever unless interval=None)
Skips files already downloaded by using the modified_since parameter.
Sample CLI
gway vbox purge
Docstring
Manually purge expired vbox entries and remove their folders.
Args:
all (bool): If True, delete all folders, even non-empty ones and those not in _open_boxes.
Sample CLI
gway vbox render-error
Signature
(title: str, message: str, *, back_link: bool = True, target: str = 'uploads') -> str
Docstring
Helper for error display with optional link back to upload main page.
Sample CLI
gway vbox stream-file-response
Signature
(path: str, filename: str) -> bottle.HTTPResponse
Docstring
Return a proper file download response that bypasses HTML templating.
Sample CLI
gway vbox view-downloads
Signature
(*hashes: tuple[str], vbid: str = None, modified_since=None, **kwargs)
Docstring
GET: Show list of files in the box (with hash), allow selection/downloads.
If a single hash is provided, return that file. Multiple hashes are not supported yet.
- Allows access via full vbid (short.long) or short-only (just the folder name).
- If full vbid is used, shows link to upload more files.
- If modified_since is passed (as iso or epoch seconds), only send file if newer, else 304.
TODOs
# TODO: Support multiple hashes by checking them one by one. If the first doesn't exist,
# try the next and so forth. Give up when every hash fails to match. First matches is chosen first.
Sample CLI
gway vbox view-uploads
References
build_url,
error,
exception,
info,
mail,
mail.send,
resource,
warning,
web,
web.app,
web.app.build_url,
web.server,
web.server.is_local Signature
(*, vbid: str = None, timeout: int = 60, files: int = 4, email: str = None, **kwargs)
Docstring
GET: Display upload interface or create a new upload box.
POST: Handle uploaded files to a specific vbid.