shrupl/notes.md
Jörn-Michael Miehe 56223b3ae8 [wip] documentation
- added more notes
- `main.rs` logging
- clearer matching of `ClientError::ResponseStatus`
2025-06-15 00:44:28 +00:00

1.9 KiB

Outline of sharry upload API

  1. POST to "new" route

  2. POST to "tus" route

  3. (multi) PATCH to "$patch_uri"

    • hdr: Sharry-Alias, Sharry-File-Length, Sharry-File-Name, Sharry-File-Type, Tus-Resumable
    • hdr: Upload-Offset: 10485760 * (n-1) for nth chunk
    • body: up to 10 MiB of binary data
    • res.status == 204
    • better use res_hdr.Upload-Offset
  4. (opt) POST to "notify" route

Links

Ideas

  • cli functions

    • max retries => stop
    • "continue" and "new" flags to avoid user interaction
    • "quiet" flag to disable output entirely
    • "verbose" flag to adjust RUST_LOG for shrupl crate
  • client error rework

    • current variants are too "low level"
    • use variants like InvalidEndpoint, InvalidAlias etc.
  • hashing

    • store file hashes with all file::* variants
    • check hashes on "continue"