Skip to content

chainabit file download ​

Published (2.2.0) ​

This command is not included in Published (2.2.0). It is available in Development (2.2.0).

Development (2.2.0) ​

Download a file

Synopsis ​

text
chainabit file download <id> [options]

Arguments ​

ArgumentDescriptionDefault
<id>Required.—

Options ​

OptionDescriptionDefault
--output <path>Save to this path—
--forceReplace an existing file—

Options shared by every command are described in Global options and shared behavior.

Behavior ​

Downloads the file with the given ID and verifies it while saving. Without --output the file is saved in the current directory under its original name, reduced to a single safe file name. With --output <path> it is saved to that path. An existing file is never overwritten unless you pass --force; the file is written completely or not at all. If the downloaded size or the checksum the service provides does not match, the command fails and leaves no partial file.

Output ​

The command prints the saved path, the SHA-256 checksum of the saved file and whether the service supplied a checksum that matched. With --json, the output contains id, path, sizeBytes, sha256, serverSha256 and serverDigestVerified; serverDigestVerified is false when the service supplied no checksum.

Authentication and permissions ​

You must be signed in. If the service refuses the download, the command fails with an error.

Examples ​

bash
chainabit file download 00000000-0000-4000-8000-000000000001
chainabit file download 00000000-0000-4000-8000-000000000001 --output ./notes.txt --force

Built with purpose. chainabit.com