move blob descriptor to bud-02

This commit is contained in:
hzrd149
2024-05-22 09:37:36 -05:00
parent dc86bf301a
commit 6ed1d28d7f
2 changed files with 12 additions and 12 deletions

View File

@@ -10,6 +10,18 @@ _All pubkeys MUST be in hex format_
Defines the `/upload`, `/list` and `DELETE /<sha256>` enpoints
## Blob Descriptor
A blob descriptor is a JSON object containing `url`, `sha256`, `size`, `type`, and `uploaded` fields
- `url` A public facing url this blob can retrieved from
- `sha256` The sha256 hash of the blob
- `size` The size of the blob in bytes
- `type` (optional) The MIME type of the blob
- `uploaded` The unix timestamp of when the blob was uploaded to the server
Servers may include additional fields in the descriptor like `magnet`, `infohash`, or `ipfs` depending on other protocols they support
## PUT /upload - Upload Blob
The `PUT /upload` endpoint MUST accept binary data in the body of the request and MAY use the `Content-Type` and `Content-Length` headers to get the MIME type and size of the data