For example, pinFile API URL of Endpoint 'Hong Kong' is:
Upload and pin a file to Decoo, which will also eventually be stored to Crust network.
The body of this request needs to take the form of a multipart/form-data with the following key / values:
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.
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:
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.
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.