Skip to content

Commit

Permalink
feat: use paidBy attribute in upload
Browse files Browse the repository at this point in the history
  • Loading branch information
fedellen committed Nov 4, 2024
1 parent 28a81ba commit 7bcc7fe
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ export function createArweaveUploader(
});
}

const paidBy = await arweave.signer.getNativeAddress();
const promises = files.map(async (file) => {
const buffer = Buffer.from(file.buffer);

Expand All @@ -181,6 +182,7 @@ export function createArweaveUploader(
fileSizeFactory: () => buffer.byteLength,
dataItemOpts: {
tags: getGenericFileTagsWithContentType(file),
paidBy,
},
});
dataItemId = id;
Expand Down

0 comments on commit 7bcc7fe

Please sign in to comment.