Skip to main content
Version: 3.1.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 Http Gateway 1 : Struct, holds the url of the gateway to send the request to.
  • Ipns Name 2 : UTF-8 String, holds the IPNS name used to resolve the requested data.
  • Write To File path 3 : The filepath where the downloaded data is written to.
  • Create Path If Missing 4 : Creates the filepath to where the downloaded data should be written to if it is missing.
  • Overwrite Existing File 5 : If set to false and the file exists this function will abort with failure. Otherwise, an existing file will be overwritten.

There's also an optional input Request Name 6, a unique identifier for the plugin's HTTP subsystem. It allows to fetch the request by name. This is purely optional and only changes how the HTTP request will be managed internally by the plugin.

IPNS Download File

The returned Response is a struct that holds data such as headers, status code, and body of the response of the HTTP request.

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.