#
URLFor example, pinFile API URL of Endpoint 'Hong Kong' is:
#
DescriptionUpload and pin a file to Decoo, which will also eventually be stored to Crust network.
note
#
TypePOST
#
Headers#
BodyThe body of this request needs to take the form of a multipart/form-data with the following key / values:
file
The first key in the form-data body should be named "file", and the value should be the file you're attempting to upload to Decoo.
decooMetadata (Optional)
You can also include some metadata when pinning content to Decoo cloud. The metadata can later be used for easy querying on what you've pinned with pinList request.
decooMetadata takes following form:
An example decooMetadata is like below:
cid
IPFS CID of the file to upload. There are mutltiple approaches to get a file's IPFS CID. For example:
- IPFS Desktop. User could install IPFS Desktop or go-ipfs locally, and call local IPFS node's /api/v0/add HTTP API to get file CIDs (Note: When calling this API, it's suggested to set only-hash parameter value as true).
- ipfs-core. Using ipfs-core go get a file's CID.
- Decoo SDK. Directly use Decoo SDK to get a file's CID.
secret
Users could use their RSA private keys to encrypt file CID to generate digital secret. For more information, please refer to related sections of Pinning with API.