Skip to main content

Tags

Bundlr supports adding tags or metadata to each transaction.

Content-Type

When uploading a file that will be rendered by the browser, you must specify the content-type (MIME type).

const nft = fs.readFileSync("/path/to/nft.png");
const tags = [{ name: "Content-Type", value: "image/png" }];
const tx = await bundlr.upload(nft, {
tags: [{ tags }],
});
console.log(tx);
console.log(`File uploaded ==> https://arweave.net/${tx.id}`);

Application

You can label your application name, which is helpful if you need to filter transactions by application.

const nft = fs.readFileSync("/path/to/nft.png");
const tags = [
{ name: "Content-Type", value: "image/png" },
{ name: "appName", value: "NFTs To The Moon" },
];
const tx = await bundlr.upload(nft, {
tags: [{ tags }],
});
console.log(tx);
console;

Custom

Additionally, you can use any tags your specific use case requires.