examples/marine-examples/url-downloader
2023-02-10 18:59:32 +07:00
..
artifacts chore(aqua): update aqua to 0.9.4 2023-02-10 18:59:32 +07:00
curl_adapter Update Marine Rust SDK to 0.7.1 (#394) 2022-09-09 20:11:52 -05:00
facade Update Marine Rust SDK to 0.7.1 (#394) 2022-09-09 20:11:52 -05:00
local_storage Update Marine Rust SDK to 0.7.1 (#394) 2022-09-09 20:11:52 -05:00
old-air Remove fldist from examples (#69) 2022-02-16 09:21:21 -07:00
build.sh Reorg (#10) 2021-07-16 02:04:18 -05:00
Config.toml Reorg (#10) 2021-07-16 02:04:18 -05:00
deploy_separate.sh update aqua deploy to config-path from data-path 2022-04-28 09:40:54 +02:00
deploy.sh reflecting some changes in aqua to fix the url-downloader example (#347) 2022-06-29 10:51:41 +02:00
deployment_cfg.json changes to comply with the schema pairs support for mounted_binaries, mapped_dirs, envs (#346) 2022-06-28 14:55:15 +02:00
deployment_data.txt update aqua deploy to config-path from data-path 2022-04-28 09:40:54 +02:00
download_url.aqua Remove fldist from examples (#69) 2022-02-16 09:21:21 -07:00
README.md reflecting some changes in aqua to fix the url-downloader example (#347) 2022-06-29 10:51:41 +02:00
repl_config.toml Reorg (#10) 2021-07-16 02:04:18 -05:00

Download file to disk

Example that shows how to work with disk access and how to link several Wasm modules into a service.

Build & deploy it

./deploy.sh

Call it

aqua run \
     --addr /dns4/kras-06.fluence.dev/tcp/19001/wss/p2p/12D3KooWDUszU2NeWyUVjCXhGEt1MoZrhvdmaQQwtZUriuGN1jTr  \
     -i download_url.aqua \
     -f'download("https://fluence.network/img/svg/logo_new.svg", "logo.svg", "<your-service-peer-id>", "<your-service-id>")'

Please note that the <your-service-peer-id> is a peer where you deployed your service to using the deploy.sh script and the <your-service-id> is one you get after successfully deploying you service on the peer, e.g.:

...
Now time to make a blueprint...
Blueprint id:
d0a0c3cff0b371f833918ceb7dccbb8e38e3847bc7bf5d35a0e730f24568e13e
And your service id is:
"46477b20-c061-46ea-89bc-25906ad543d6"

For more in depth reading on the example please refer to the Marine Examples Readme