Skip to content

cg api file-upload

The file-upload service endpoint. See cg api for how these relate to the higher-level commands.

Every command also accepts -h / --help.

cg api file-upload

Upload a file from stdin (the fileupload servlet).

usage: cg api file-upload [-h] [--filename FILENAME] [--content-type CONTENT_TYPE]
                          [--prev-id PREV_ID] [--prev-content-hash PREV_CONTENT_HASH]

Options

  • --filename FILENAME (default: data.bin) — Optional filename provided to the server for the uploaded file; e.g., 'cover.png'.
  • --content-type CONTENT_TYPE (default: application/octet-stream) — Optional content type for the uploaded file; e.g., 'application/octet-stream'.
  • --prev-id PREV_ID — Optional previous file ID for the uploaded file; e.g., 12345.
  • --prev-content-hash PREV_CONTENT_HASH — Optional previous content hash for the uploaded file.

Generated from the parser itself. For when to use these, see the CLI guides.