s6.app.r2.upload¶

Upload a file or directory to R2.

Usage¶

s6 r2 upload <local-path> <dest-key-or-prefix> [-b BUCKET] [-e ENDPOINT] [–overwrite]

Behavior¶

  • If <local-path> is a file: - When <dest-key-or-prefix> ends with ‘/’, the file is uploaded as

    <dest-key-or-prefix>/<basename>.

    • Otherwise it is uploaded exactly as the provided key.

  • If <local-path> is a directory, its contents are uploaded recursively under the destination prefix, preserving relative paths. In this case the destination is treated as a prefix; if it does not end with ‘/’, one is appended for convenience.

s6.app.r2.upload.main() None