From c195efdf3065597ad2eecc53bf241538c91c5317 Mon Sep 17 00:00:00 2001 From: hzrd149 Date: Thu, 26 Dec 2024 09:44:15 -0600 Subject: [PATCH] Change /media endpoint to require "media" auth --- buds/05.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/buds/05.md b/buds/05.md index 2ad9851..97d9ff9 100644 --- a/buds/05.md +++ b/buds/05.md @@ -18,9 +18,12 @@ Servers MAY reject media uploads for any reason and should respond with the appr ### 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 @@ -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 -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