diff --git a/components/IscnRegisterForm.vue b/components/IscnRegisterForm.vue index ef4dddaa..e7502ddd 100644 --- a/components/IscnRegisterForm.vue +++ b/components/IscnRegisterForm.vue @@ -1072,6 +1072,7 @@ export default class IscnRegisterForm extends Vue { async onUploadOnly(): Promise { logTrackerEvent(this, 'ISCNCreate', 'ClickUpload', '', 1); + this.uploadStatus = 'loading' await this.getLikerIdsAddresses() this.$emit('handleSubmit') this.error = '' @@ -1172,6 +1173,7 @@ export default class IscnRegisterForm extends Vue { logTrackerEvent(this, 'ISCNCreate', 'SubmitToNumbers', '', 1); } this.isUploadingArweave = true; + this.uploadStatus = 'uploading'; try { const arrayBuffer = await this.fileBlob.arrayBuffer(); const buffer = Buffer.from(arrayBuffer); @@ -1206,6 +1208,7 @@ export default class IscnRegisterForm extends Vue { logTrackerEvent(this, 'ISCNCreate', 'SubmitToNumbers', '', 1); this.isOpenSignDialog = true; try { + this.uploadStatus = 'loading'; const formData = new FormData(); if (this.fileBlob) formData.append('file', this.fileBlob); const { @@ -1250,6 +1253,7 @@ export default class IscnRegisterForm extends Vue { return } try { + this.uploadStatus = 'signing' const res = await signISCNTx(formatISCNTxPayload(this.payload), this.signer, this.address) this.uploadStatus = 'success' this.$emit('txBroadcasted', res) diff --git a/utils/arweave/v2.ts b/utils/arweave/v2.ts index 76a5b26d..03d4a37c 100644 --- a/utils/arweave/v2.ts +++ b/utils/arweave/v2.ts @@ -150,8 +150,11 @@ export async function uploadSingleFileToBundlr( }: { fileSize: number; fileType?: string, ipfsHash: string; txHash: string }, ) { const bundler = await getBundler({ fileSize, ipfsHash, txHash }) - const response = await bundler.upload(file, { - tags: fileType ? [{ name: 'Content-Type', value: fileType }] : [], - }) + const tags = [ + { name: 'IPFS-Add', value: ipfsHash }, + { name: 'standard', value: 'v0.1'}, + ]; + if (fileType) tags.push({ name: 'Content-Type', value: fileType }) + const response = await bundler.upload(file, { tags }) return response.id }