Considers .content as alt field

This commit is contained in:
arthurfranca 2023-05-17 11:20:23 -03:00
parent cc343b96be
commit 1cc2d72204
2 changed files with 2 additions and 6 deletions

6
54.md
View File

@ -4,7 +4,7 @@ NIP-54
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.
@ -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
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`
- `#`
@ -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`
NIP-94 event content may be used as `content` fragment field or alternatively as `alt` if corresponding tag is absent.
## Recommended client behavior
When uploading images during a new post, clients can collect metadata

2
94.md
View File

@ -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.
* `size` (optional) size of file in bytes
* `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
* `i` (optional) torrent infohash
* `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>],
["size", <size of file in bytes>],
["dim", <size of file in pixels>],
["alt", <text description>],
["magnet",<magnet URI> ],
["i",<torrent infohash>],
["blurhash", <value>],