Skip to main content

RemoteStorage class

Fetch and upload files to IPFS or any other storage.

Signature:

export declare class RemoteStorage

Constructors

ConstructorModifiersDescription
(constructor)(storage)Constructs a new instance of the RemoteStorage class

Methods

MethodModifiersDescription
fetch(hash)Fetch data from any IPFS hash without worrying about gateways, data types, etc. Simply pass in an IPFS url and we'll handle fetching for you and try every public gateway to get the fastest response.
upload(data, options)Upload any data to an IPFS directory. We'll handle all the details for you, including pinning your files and making sure that you get the fastest upload speeds.