upleb.uk

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

summaryrefslogtreecommitdiff
path: root/94.md
diff options
context:
space:
mode:
Diffstat (limited to '94.md')
-rw-r--r--94.md7
1 files changed, 4 insertions, 3 deletions
diff --git a/94.md b/94.md
index 95b6a3b..e35dfa1 100644
--- a/94.md
+++ b/94.md
@@ -6,7 +6,7 @@ File Metadata
6 6
7`draft` `optional` 7`draft` `optional`
8 8
9The purpose of this NIP is to allow an organization and classification of shared files. So that relays can filter and organize in any way that is of interest. With that, multiple types of filesharing clients can be created. NIP-94 support is not expected to be implemented by "social" clients that deal with kind:1 notes or by longform clients that deal with kind:30023 articles. 9The purpose of this NIP is to allow an organization and classification of shared files. So that relays can filter and organize in any way that is of interest. With that, multiple types of filesharing clients can be created. NIP-94 support is not expected to be implemented by "social" clients that deal with `kind:1` notes or by longform clients that deal with `kind:30023` articles.
10 10
11## Event format 11## Event format
12 12
@@ -14,8 +14,8 @@ This NIP specifies the use of the `1063` event type, having in `content` a descr
14 14
15* `url` the url to download the file 15* `url` the url to download the file
16* `m` a string indicating the data type of the file. The [MIME types](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types) format must be used, and they should be lowercase. 16* `m` a string indicating the data type of the file. The [MIME types](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types) format must be used, and they should be lowercase.
17* `"aes-256-gcm"` (optional) key and nonce for AES-GCM encryption with tagSize always 128bits
18* `x` containing the SHA-256 hexencoded string of the file. 17* `x` containing the SHA-256 hexencoded string of the file.
18* `ox` containing the SHA-256 hexencoded string of the original file, before any transformations done by the upload server
19* `size` (optional) size of file in bytes 19* `size` (optional) size of file in bytes
20* `dim` (optional) size of file in pixels in the form `<width>x<height>` 20* `dim` (optional) size of file in pixels in the form `<width>x<height>`
21* `magnet` (optional) URI to magnet file 21* `magnet` (optional) URI to magnet file
@@ -25,15 +25,16 @@ This NIP specifies the use of the `1063` event type, having in `content` a descr
25* `image` (optional) url of preview image with same dimensions 25* `image` (optional) url of preview image with same dimensions
26* `summary` (optional) text excerpt 26* `summary` (optional) text excerpt
27* `alt` (optional) description for accessibility 27* `alt` (optional) description for accessibility
28* `fallback` (optional) zero or more fallback file sources in case `url` fails
28 29
29```json 30```json
30{ 31{
31 "kind": 1063, 32 "kind": 1063,
32 "tags": [ 33 "tags": [
33 ["url",<string with URI of file>], 34 ["url",<string with URI of file>],
34 ["aes-256-gcm",<key>, <iv>],
35 ["m", <MIME type>], 35 ["m", <MIME type>],
36 ["x",<Hash SHA-256>], 36 ["x",<Hash SHA-256>],
37 ["ox",<Hash SHA-256>],
37 ["size", <size of file in bytes>], 38 ["size", <size of file in bytes>],
38 ["dim", <size of file in pixels>], 39 ["dim", <size of file in pixels>],
39 ["magnet",<magnet URI> ], 40 ["magnet",<magnet URI> ],