Use the bundled scripts inside this skill directory.
scripts/upload.mjs — Upload local files or directories to an Xdrop server and print the share linkscripts/download.mjs — Download an Xdrop share link, decrypt it locally, and save the filesEnvironment requirements:
bun scripts/upload.mjs --server <xdrop-site-url> <file-or-directory> [...]
Prefer these flags when relevant:
--quiet: suppress progress output and keep stdout clean--json: return transferId, shareUrl, and expiresAt--expires-in : choose a supported expiry--api-url : override the default /api/v1 --name : set the transfer display name--concurrency : limit parallel uploads per fileUseful examples:
bun scripts/upload.mjs --server http://localhost:8080 ./dist/report.pdf
bun scripts/upload.mjs --server http://localhost:8080 --quiet ./archive.zip
bun scripts/upload.mjs --server http://localhost:8080 --expires-in 600 --json ./notes.txt
If the user wants verification, upload a small temporary file and then confirm the public transfer API or browser can open the returned link.
Require the full share link, including #k=.... Without the fragment key, the transfer cannot be decrypted.
bun scripts/download.mjs "<share-url>"
Prefer these flags when relevant:
--output : choose the destination directory--quiet: suppress progress output and keep stdout clean--json: return transferId, outputRoot, and saved file paths--api-url : override the default /api/v1 Useful examples:
bun scripts/download.mjs "http://localhost:8080/t/abc123#k=..."
bun scripts/download.mjs --output ./downloads "http://localhost:8080/t/abc123#k=..."
bun scripts/download.mjs --quiet --json --output ./downloads "http://localhost:8080/t/abc123#k=..."
By default the downloader writes to ./xdrop- and preserves the manifest's relative paths.
#k=... fragment is not decryptable. Ask for the full original share URL.--quiet whenever another command or caller needs to capture stdout. Progress logs otherwise go to stderr, but the final result still matters.--quiet when another command or script needs to capture stdout.共 1 个版本