Create a store
Call the .submit() function to create a store object and save a file.
Returns
The hash of the file that was just pushed to the Storage Engine.
Usage & Example
Required parameters
Parameter | Description |
---|---|
account - account | Account to use for signing. |
channel - string | Channel of the message. Ideally, an application would decide and use one channel. |
fileObject - file or blob or string | The file you want to store. |
storageEngine - StorageEngine | Storage engine to use, either Aleph storage or IPFS. Possible values: |
APIServer - string | Select an API server accepting files. ex: https://api1.aleph.im and "https://api2.aleph.im" are two available API servers accepting files. |
Retrieve file via direct url
In the response, item_hash can be used to retrieve the stored file via a direct URL as follow:
https://<API SERVER URL>/api/v0/storage/raw/<File Item Hash Here>
Api server can be any api server accepting files.
Or at the IPFS URL: https://ipfs.io/ipfs/<File Item Hash Here>
Last updated