upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKieran <kieran@harkin.me>2024-05-27 14:52:49 +0100
committerGitHub <noreply@github.com>2024-05-27 10:52:49 -0300
commit17593a41ab7ca51305db07cbfe1866f88e790206 (patch)
tree6cd03eb0d81198afc4b2f61fb4db5a02bcec5068
parentbd9c7a1b8e372b3c8e518861b1f4ea5c92ef1888 (diff)
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>
-rw-r--r--96.md3
1 files changed, 3 insertions, 0 deletions
diff --git a/96.md b/96.md
index e882870..c8b3170 100644
--- a/96.md
+++ b/96.md
@@ -101,6 +101,7 @@ List of form fields:
101- `alt`: **RECOMMENDED** strict description text for visibility-impaired users. 101- `alt`: **RECOMMENDED** strict description text for visibility-impaired users.
102- `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. 102- `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.
103- `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. 103- `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.
104- `no_transform`: "true" asks server not to transform the file and serve the uploaded file as is, may be rejected.
104 105
105Others custom form data fields may be used depending on specific `server` support. 106Others custom form data fields may be used depending on specific `server` support.
106The `server` isn't required to store any metadata sent by `clients`. 107The `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
110 111
111The `server` MUST link the user's `pubkey` string as the owner of the file so to later allow them to delete the file. 112The `server` MUST link the user's `pubkey` string as the owner of the file so to later allow them to delete the file.
112 113
114`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.
115
113### Response codes 116### Response codes
114 117
115- `200 OK`: File upload exists, but is successful (Existing hash) 118- `200 OK`: File upload exists, but is successful (Existing hash)