aqua/npm/aqua/ipfs.aqua
Dima 7c711f15e4
Fix ipfs upload in aqua (#415)
* fix path

* fix ipfs

* fix pathes
2022-02-05 14:20:30 +03:00

19 lines
337 B
Plaintext

module IpfsExports
import "@fluencelabs/aqua-ipfs/ipfs-api.aqua"
import "run-builtins/run-builtins.aqua"
export uploadFile
const ON_PEER ?= HOST_PEER_ID
func uploadFile(path: string) -> UploadResult:
on ON_PEER:
multiaddr <- get_external_api_multiaddr(ON_PEER)
result <- LocalIpfs.uploadFile(path, multiaddr)
<- result