DEVELOPER DOCS
API Docs
upload()

bundlr.upload(data, tags)

Uploads data.

Parameters

- data: The data to upload - tags: Optional metatags

Returns

- response: A JSON object with the following values

response = {
  id, // the transaction id of the upload
  timestamp: // The timestamp of when the transaction was uploaded and verified
}
const dataToUpload = "GM world."; // String to upload
try {
  const response = await bundlr.upload(dataToUpload);
  console.log(`Data uploaded ==> https://arweave.net/${response.id}`);
} catch (e) {
  console.log("Error uploading file ", e);
}
ℹ️

The transaction id returned as part of the response is used to download the data, simply create a URL with the format https://arweave.net/[transaction-id].