In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "what is the use of IPFS add". Friends who are interested may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let the editor take you to learn "what is the use of IPFS add"?
Ipfs addUSAGE ipfs add...-Add a file or directory to ipfs.SYNOPSIS ipfs add [--recursive |-- quiet |-- Q] [--quieter |-Q] [--silent] [--progress |-- p] [--trickle |-t] [--only-hash |-n] [--wrap-with-directory |-w] [--hidden |-H] [--chunker= |-s] [--pin=false] [ -- raw-leaves] [--nocopy] [--fscache] [--cid-version=] [--hash=] [- -]. ARGUMENTS...-The path to a file to be added to ipfs.OPTIONS-r Recursive bool-Add directory paths recursively. Default: false. -Q,-- quiet bool-Write minimal output. -Q,-- quieter bool-Write only final hash. Silent bool-Write no output. -p,-- progress bool-Stream progress data. -t,-- trickle bool-Use trickle-dag format for dag generation. -n,-- only-hash bool-Only chunk and hash-do not write to disk. -w,-- wrap-with-directory bool-Wrap files with a directory object. H,-- hidden bool-Include files that are hidden. Only takes effect on recursive add. -s,-- chunker string-Chunking algorithm, size- [bytes] or rabin- [min]-[avg]-[max]. Default: size-262144. Pin bool-Pin this object when adding. Default: true. Raw-leaves bool-Use raw blocks for leaf nodes. (experimental). Nocopy bool-Add the file using filestore. Implies raw-leaves. (experimental). Fscache bool-Check the filestore for pre-existing blocks. (experimental). Cid-version int-CID version. Defaults to 0 unless an option that depends on CIDv1 is passed. (experimental). Hash string-Hash function to use. Implies CIDv1 if not sha2-256. (experimental). Default: sha2-256.DESCRIPTION Adds contents of to ipfs. Use-r to add directories. Note that directories are added recursively, to form the ipfs MerkleDAG. The wrap option,'- w', wraps the file (or files, if using the recursive option) in a directory. This directory contains only the files which have been added, and means that the file retains its filename. For example: > ipfs add example.jpg added QmbFMke1KXqnYyBBWxB74N4c5SBnJMVAiMNRcGu6x1AwQH example.jpg > ipfs add example.jpg-w added QmbFMke1KXqnYyBBWxB74N4c5SBnJMVAiMNRcGu6x1AwQH example.jpg added QmaG4FuMqEBnQNn3C8XJ5bpW8kLs7zq2ZXgHptJHbKDDVx You can now refer to the added file in a gateway, like so: / ipfs/QmaG4FuMqEBnQNn3C8XJ5bpW8kLs7zq2ZXgHptJHbKDDVx/example.jpg The chunker option,'- s', specifies the chunking strategy that dictates how to break files into blocks. Blocks with same content can be deduplicated. The default is a fixed block size of 256 * 1024 bytes, 'size-262144'. Alternatively, you can use the rabin chunker for content defined chunking by specifying rabin- [min]-[avg]-[max] (where min/avg/max refer to the resulting chunk sizes). Using other chunking strategies will produce different hashes for the same file. > ipfs add-- chunker=size-2048 ipfs-logo.svg added QmafrLBfzRLV4XSH1XcaMMeaXEUhDJjmtDfsYU95TrWG87 ipfs-logo.svg > ipfs add-- chunker=rabin-512-1024-2048 ipfs-logo.svg added Qmf1hDN65tR55Ubh3RN1FPxr69xq3giVBz1KApsresY8Gn ipfs-logo.svg You can now check what blocks have been created by: > ipfs object links QmafrLBfzRLV4XSH1XcaMMeaXEUhDJjmtDfsYU95TrWG87 QmY6yj1GsermExDXoosVE3aSPxdMNYr6aKuw3nA8LoWPRS 2059 Qmf7ZQeSxq2fJVJbCmgTrLLVN9tDR9Wy5k75DxQKuz5Gyt 1195 > ipfs object links Qmf1hDN65tR55Ubh3RN1FPxr69xq3giVBz1KApsresY8Gn QmY6yj1GsermExDXoosVE3aSPxdMNYr6aKuw3nA8LoWPRS 2059 QmerURi9k4XzKCaaPbsK6BL5pMEjF7PGphjDvkkjDtsVf3 868 QmQB28iwSriSUSMqG2nXDTLtdPHgWb4rebBrU7Q1j4vxPv 338 so far, I believe you have a deeper understanding of "what is the use of IPFS add". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.