/api/v0/block/put
Store input as an IPFS block.
Arguments
cid-codec[string]: Multicodec to use in returned CID. Default:raw. Required: no.mhtype[string]: Multihash hash function. Required: no.mhlen[int]: Multihash hash length. Default:-1. Required: no.pin[bool]: Pin added blocks recursively. Default:false. Required: no.allow-big-block[bool]: Disable block size check and allow creation of blocks bigger than 1MiB. WARNING: such blocks won't be transferable over the standard bitswap. Default:false. Required: no.format[string]: Use legacy format for returned CID (DEPRECATED). Required: no.
Request Body
Argument data is of file type. This endpoint expects one or several files (depending on the command) in the body of the request as 'multipart/form-data'.
Response
On success, the call to this endpoint will return with 200 and the following body:
{
"Key": "<string>",
"Size": "<int>"
}
cURL Example
curl -X POST -F file=@myfile "http://127.0.0.1:5001/api/v0/block/put?cid-codec=raw&mhtype=<value>&mhlen=-1&pin=false&allow-big-block=false&format=<value>"
Last updated