Skip to main content
Version: 2.0.0

Download File

Download File Function

IPFS Download File Downloads a file from the IPFS network for the specified CID/Path. This function requires inputs as follows:

  • Ipfs Pinning Service 1 : Struct, holds the url and name of the pinning service the data was pinned to. It can be left empty, but total number of bytes will not be known.
  • Ipfs Http Gateway 2 : Struct, holds the url of the gateway to send the request to.
  • Ipfs Address 3 : Struct, holds the CID and path of the file on IPFS network.
  • Write To File path 4 : The filepath where the downloaded data is written to.
  • Create Path If Missing 5 : Creates the filepath to where the downloaded data should be written to if it is missing.
  • Overwrite Existing File 6 : If set to false and the file exists this function will abort with failure. Otherwise, an existing file will be overwritten.

IPFS Download File

info

If Success is True that means that the response from the IPFS network was successful and writing file to disk to the specified path was also successful.

If successful returns outputs as follows:

  • Request Handle 7 : Handle to a HTTP request, allows for cancellation of an ongoing request.
  • Bytes Received 8 : Number of bytes received while the request is still ongoing.
  • Bytes Total 9 : Total bytes expected to receive.
  • Response 10 : Struct, holds data such as headers, status code, and body of the response of the HTTP request.