mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-11-13 23:39:08 -05:00
b0e6c01321
* Add NIP-95 - File Storage * Add missing response info * Make it clear that is is an HTTP file storage server integration * Add monetization suggestion * Use zap split tags for monetization suggestion * Add resize option * Add Zap Gates Integration * Replace /nip96 convention with /.well-known/nostr.json configuration * Relays can choose to also act as HTTP file storage server * Remove nip96 tag in favor of x tags third element * Fix typo * Remove redirect cooperation * Replaced 422 with 400 status code * Update 96.md Co-authored-by: Jon Staab <jstaab@protonmail.com> * Update 96.md Co-authored-by: Jon Staab <jstaab@protonmail.com> * Update 96.md Co-authored-by: Jon Staab <jstaab@protonmail.com> * Update 96.md Co-authored-by: Jon Staab <jstaab@protonmail.com> * Update 96.md Co-authored-by: Jon Staab <jstaab@protonmail.com> * Update 96.md Co-authored-by: Jon Staab <jstaab@protonmail.com> * Update 96.md Co-authored-by: Jon Staab <jstaab@protonmail.com> * Make file expiration a range and add terms_of_service * Add optional content_type field * Add plans and tos * Remove monetization * Apply minor fixes * Update 96.md Co-authored-by: Semisol <45574030+Semisol@users.noreply.github.com> * Fix after review * Add kind 10096 * Apply suggestions * Add suggestions * Remove duplicate field * Add optional is_nip98_required plan config * Add suggestions * Replace x with ox tag for original file hash * Make minor changes * Remove nip96 namespace response field * Add note about alternative file processing flow * Simplify processing flow * Add nostrcheck to server list * Add audio/* example * Explain what metadata to show before processing is done * Add nostrage to list * Add eta * Add sove to list and replace eta with percentage * Fix status code * Add nostr.build to list * Add sovbit * Add optional extra http servers to ox tag * Add void.cat to list * Small fix * Remove ox third array element --------- Co-authored-by: Jon Staab <jstaab@protonmail.com> Co-authored-by: Semisol <45574030+Semisol@users.noreply.github.com>
2.3 KiB
2.3 KiB
NIP-94
File Metadata
draft
optional
The 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.
Event format
This NIP specifies the use of the 1063
event type, having in content
a description of the file content, and a list of tags described below:
url
the url to download the filem
a string indicating the data type of the file. The MIME types format must be used, and they should be lowercase.x
containing the SHA-256 hexencoded string of the file.ox
containing the SHA-256 hexencoded string of the original file, before any transformations done by the upload serversize
(optional) size of file in bytesdim
(optional) size of file in pixels in the form<width>x<height>
magnet
(optional) URI to magnet filei
(optional) torrent infohashblurhash
(optional) the blurhash to show while the file is being loaded by the clientthumb
(optional) url of thumbnail with same aspect ratioimage
(optional) url of preview image with same dimensionssummary
(optional) text excerptalt
(optional) description for accessibility
{
"kind": 1063,
"tags": [
["url",<string with URI of file>],
["m", <MIME type>],
["x",<Hash SHA-256>],
["ox",<Hash SHA-256>],
["size", <size of file in bytes>],
["dim", <size of file in pixels>],
["magnet",<magnet URI> ],
["i",<torrent infohash>],
["blurhash", <value>],
["thumb", <string with thumbnail URI>],
["image", <string with preview URI>],
["summary", <excerpt>],
["alt", <description>]
],
"content": "<caption>",
...
}
Suggested use cases
- A relay for indexing shared files. For example, to promote torrents.
- A pinterest-like client where people can share their portfolio and inspire others.
- A simple way to distribute configurations and software updates.