mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-12-25 01:35:52 -05:00
Considers .content as alt field
This commit is contained in:
parent
cc343b96be
commit
1cc2d72204
6
54.md
6
54.md
|
@ -4,7 +4,7 @@ NIP-54
|
||||||
Inline Resource Metadata
|
Inline Resource Metadata
|
||||||
------------------------
|
------------------------
|
||||||
|
|
||||||
`draft` `optional` `author:arthurfranca` `author:Giszmo` `author:jb55`
|
`draft` `optional` `author:arthurfranca` `author:Giszmo` `author:jb55` `author:vitorpamplona`
|
||||||
|
|
||||||
Inline resource metadata is additional information associated with urls in notes that clients can optionally use to enhance resource loading.
|
Inline resource metadata is additional information associated with urls in notes that clients can optionally use to enhance resource loading.
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ The metadata can be appended to any url, like this [NIP-21](21.md) one: `nostr:n
|
||||||
|
|
||||||
## NIP-94 File Fragments
|
## NIP-94 File Fragments
|
||||||
|
|
||||||
Besides available w3c and proprietary URI fragment usage, nostr uses existing [NIP-94](94.md) tags as file fragment name-value pairs. For example, one could join the following strings to form an image url with inline metadata:
|
Besides available w3c and proprietary URI fragment usage, nostr uses existing [NIP-94](94.md) tags as file fragment name-value pairs. NIP-94 event `.content` is equivalent to `alt` fragment field. For example, one could join the following strings to form an image url with inline metadata:
|
||||||
|
|
||||||
- `https://nostr.build/i/863321bb1ae68830ebcf9a343ca0a5e0ce2323d0a55b7fbe86f7a886cf61db8d.jpg`
|
- `https://nostr.build/i/863321bb1ae68830ebcf9a343ca0a5e0ce2323d0a55b7fbe86f7a886cf61db8d.jpg`
|
||||||
- `#`
|
- `#`
|
||||||
|
@ -28,8 +28,6 @@ Besides available w3c and proprietary URI fragment usage, nostr uses existing [N
|
||||||
|
|
||||||
Multiple array values use repeated names and are positioned in the same order of ocurrence in the tag array. For instance, `["aes-256-gcm", 'i-am-a-key', 'i-am-an-iv']` becomes `aes-256-gcm=i-am-a-key&aes-256-gcm=i-am-an-iv`
|
Multiple array values use repeated names and are positioned in the same order of ocurrence in the tag array. For instance, `["aes-256-gcm", 'i-am-a-key', 'i-am-an-iv']` becomes `aes-256-gcm=i-am-a-key&aes-256-gcm=i-am-an-iv`
|
||||||
|
|
||||||
NIP-94 event content may be used as `content` fragment field or alternatively as `alt` if corresponding tag is absent.
|
|
||||||
|
|
||||||
## Recommended client behavior
|
## Recommended client behavior
|
||||||
|
|
||||||
When uploading images during a new post, clients can collect metadata
|
When uploading images during a new post, clients can collect metadata
|
||||||
|
|
2
94.md
2
94.md
|
@ -18,7 +18,6 @@ This NIP specifies the use of the `1063` event type, having in `content` a descr
|
||||||
* `x` containing the SHA-256 hexencoded string of the file.
|
* `x` containing the SHA-256 hexencoded string of the file.
|
||||||
* `size` (optional) size of file in bytes
|
* `size` (optional) size of file in bytes
|
||||||
* `dim` (optional) size of file in pixels in the form `<width>x<height>`
|
* `dim` (optional) size of file in pixels in the form `<width>x<height>`
|
||||||
* `alt` (optional) accessible text label that describes the image or video
|
|
||||||
* `magnet` (optional) URI to magnet file
|
* `magnet` (optional) URI to magnet file
|
||||||
* `i` (optional) torrent infohash
|
* `i` (optional) torrent infohash
|
||||||
* `blurhash`(optional) the [blurhash](https://github.com/woltapp/blurhash) to show while the file is being loaded by the client
|
* `blurhash`(optional) the [blurhash](https://github.com/woltapp/blurhash) to show while the file is being loaded by the client
|
||||||
|
@ -40,7 +39,6 @@ This NIP specifies the use of the `1063` event type, having in `content` a descr
|
||||||
["x",<Hash SHA-256>],
|
["x",<Hash SHA-256>],
|
||||||
["size", <size of file in bytes>],
|
["size", <size of file in bytes>],
|
||||||
["dim", <size of file in pixels>],
|
["dim", <size of file in pixels>],
|
||||||
["alt", <text description>],
|
|
||||||
["magnet",<magnet URI> ],
|
["magnet",<magnet URI> ],
|
||||||
["i",<torrent infohash>],
|
["i",<torrent infohash>],
|
||||||
["blurhash", <value>],
|
["blurhash", <value>],
|
||||||
|
|
Loading…
Reference in New Issue
Block a user