Skip to main content

Connecting To A Node

When using the chunking uploader, first connect to a node using the same flow as with our default uploader and then follow that by requesting the chunked uploader using bundlr.uploader.chunkedUploader.

You can use any of our public and devnet node addresses.

tip

The chunkedUploader object reference must be updated before each subsequent upload, it can not be reused.

import Bundlr from "@bundlr-network/client";
import fs from "fs";

// First create a Bundlr object
const bundlr = new Bundlr("http://node1.bundlr.network", "arweave", myPrivateKey);

// Now get a reference to the chunked uploader
// If you're doing more than one upload, you will need to refresh this
// object reference for each upload.
let uploader = bundlr.uploader.chunkedUploader;