mirror of https://github.com/hzrd149/blossom.git
Change /media endpoint to require "media" auth
This commit is contained in:
parent
8b5d740aa4
commit
c195efdf30
11
buds/05.md
11
buds/05.md
|
@ -18,9 +18,12 @@ Servers MAY reject media uploads for any reason and should respond with the appr
|
||||||
|
|
||||||
### Upload Authorization
|
### Upload Authorization
|
||||||
|
|
||||||
Servers MAY require an `upload` [authorization event](./02.md#upload-authorization-required) to identify the uploader
|
Servers MAY require a `media` [authorization event](./02.md#upload-authorization-required) to identify the uploader
|
||||||
|
|
||||||
If a server requires an `upload` authorization event it MUST preform all the checks outlined in the [`/upload`](./02.md#upload-authorization-required) endpoint
|
If a server requires a `media` authorization event it MUST preform the following checks
|
||||||
|
|
||||||
|
1. The `t` tag MUST be set to `media`
|
||||||
|
2. MUST contain at least one `x` tag matching the sha256 hash of the body of the request
|
||||||
|
|
||||||
## HEAD /media
|
## HEAD /media
|
||||||
|
|
||||||
|
@ -40,6 +43,6 @@ If a longer optimization or transformation process is needed, or if the client n
|
||||||
|
|
||||||
Clients MAY let a user selected a "trusted processing" server for uploading images or short videos
|
Clients MAY let a user selected a "trusted processing" server for uploading images or short videos
|
||||||
|
|
||||||
Once a server has been selected, the client can upload the original media to the `/media` endpoint of the trusted server and get the optimized blob back
|
Once a server has been selected, the client uploads the original media to the `/media` endpoint of the trusted server and get the optimized blob back
|
||||||
|
|
||||||
Then optionally the client can ask the user to sign another `upload` authorization event for the new optimized blob and call the `/mirror` endpoint on other servers to distribute the blob
|
Then the client can ask the user to sign another `upload` authorization event for the new optimized blob and call the `/mirror` endpoint on other servers to distribute the blob
|
||||||
|
|
Loading…
Reference in New Issue