From 17593a41ab7ca51305db07cbfe1866f88e790206 Mon Sep 17 00:00:00 2001 From: Kieran Date: Mon, 27 May 2024 14:52:49 +0100 Subject: [PATCH] NIP-96: no transform (#1262) * no_transform * Update 96.md Co-authored-by: Santos <34815293+sant0s12@users.noreply.github.com> --------- Co-authored-by: Santos <34815293+sant0s12@users.noreply.github.com> --- 96.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/96.md b/96.md index e882870e..c8b3170b 100644 --- a/96.md +++ b/96.md @@ -101,6 +101,7 @@ List of form fields: - `alt`: **RECOMMENDED** strict description text for visibility-impaired users. - `media_type`: "avatar" or "banner". Informs the server if the file will be used as an avatar or banner. If absent, the server will interpret it as a normal upload, without special treatment. - `content_type`: mime type such as "image/jpeg". This is just a value the server can use to reject early if the mime type isn't supported. +- `no_transform`: "true" asks server not to transform the file and serve the uploaded file as is, may be rejected. Others custom form data fields may be used depending on specific `server` support. The `server` isn't required to store any metadata sent by `clients`. @@ -110,6 +111,8 @@ The hash is enough to uniquely identify a file, that's why it will be used on th The `server` MUST link the user's `pubkey` string as the owner of the file so to later allow them to delete the file. +`no_transform` can be used to replicate a file to multiple servers for redundancy, clients can use the [server list](#selecting-a-server) to find alternative servers which might contain the same file. When uploading a file and requesting `no_transform` clients should check that the hash matches in the response in order to detect if the file was modified. + ### Response codes - `200 OK`: File upload exists, but is successful (Existing hash)