forked from Qortal/qortal-ui
fix publish metadata
This commit is contained in:
parent
58e7dee8a1
commit
f37e2b76c9
@ -520,7 +520,7 @@ setOpenGifModal: { attribute: false }
|
||||
service: 'GIF_REPOSITORY',
|
||||
identifier: this.newCollectionName,
|
||||
parentEpml,
|
||||
metaData: `title=${this.newCollectionName}`,
|
||||
title: this.newCollectionName,
|
||||
uploadType: 'zip',
|
||||
selectedAddress: this.selectedAddress,
|
||||
worker: this.webWorkerImage,
|
||||
|
@ -545,6 +545,14 @@ class WebBrowser extends LitElement {
|
||||
let identifier = data.identifier;
|
||||
const data64 = data.data64;
|
||||
const filename = data.filename;
|
||||
const title = data.title;
|
||||
const description = data.description;
|
||||
const category = data.category;
|
||||
const tag1 = data.tag1;
|
||||
const tag2 = data.tag2;
|
||||
const tag3 = data.tag3;
|
||||
const tag4 = data.tag4;
|
||||
const tag5 = data.tag5;
|
||||
if (data.identifier == null) {
|
||||
identifier = 'default';
|
||||
}
|
||||
@ -566,6 +574,14 @@ class WebBrowser extends LitElement {
|
||||
worker: worker,
|
||||
isBase64: true,
|
||||
filename: filename,
|
||||
title,
|
||||
description,
|
||||
category,
|
||||
tag1,
|
||||
tag2,
|
||||
tag3,
|
||||
tag4,
|
||||
tag5,
|
||||
apiVersion: 2,
|
||||
withFee: res2.userData.isWithFee === true ? true: false
|
||||
});
|
||||
|
@ -19,9 +19,16 @@ export const publishData = async ({
|
||||
worker,
|
||||
isBase64,
|
||||
filename,
|
||||
metaData,
|
||||
apiVersion,
|
||||
withFee
|
||||
withFee,
|
||||
title,
|
||||
description,
|
||||
category,
|
||||
tag1,
|
||||
tag2,
|
||||
tag3,
|
||||
tag4,
|
||||
tag5
|
||||
}) => {
|
||||
const validateName = async (receiverName) => {
|
||||
let nameRes = await parentEpml.request("apiCall", {
|
||||
@ -171,10 +178,6 @@ export const publishData = async ({
|
||||
if (identifier != null && identifier.trim().length > 0) {
|
||||
uploadDataUrl = `/arbitrary/${service}/${registeredName}/${identifier}${urlSuffix}?apiKey=${getApiKey()}`
|
||||
|
||||
if(metaData){
|
||||
uploadDataUrl = `/arbitrary/${service}/${registeredName}/${identifier}${urlSuffix}?${metaData}&apiKey=${getApiKey()}`
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if(withFee){
|
||||
@ -184,6 +187,30 @@ export const publishData = async ({
|
||||
if(filename != null && filename != "undefined"){
|
||||
uploadDataUrl = uploadDataUrl + '&filename=' + encodeURIComponent(filename)
|
||||
}
|
||||
if(title != null && title != "undefined"){
|
||||
uploadDataUrl = uploadDataUrl + '&title=' + encodeURIComponent(title)
|
||||
}
|
||||
if(description != null && description != "undefined"){
|
||||
uploadDataUrl = uploadDataUrl + '&description=' + encodeURIComponent(description)
|
||||
}
|
||||
if(category != null && category != "undefined"){
|
||||
uploadDataUrl = uploadDataUrl + '&category=' + encodeURIComponent(category)
|
||||
}
|
||||
if(tag1 != null && tag1 != "undefined"){
|
||||
uploadDataUrl = uploadDataUrl + '&tag1=' + encodeURIComponent(tag1)
|
||||
}
|
||||
if(tag2 != null && tag2 != "undefined"){
|
||||
uploadDataUrl = uploadDataUrl + '&tag2=' + encodeURIComponent(tag2)
|
||||
}
|
||||
if(tag3 != null && tag3 != "undefined"){
|
||||
uploadDataUrl = uploadDataUrl + '&tag3=' + encodeURIComponent(tag3)
|
||||
}
|
||||
if(tag4 != null && tag4 != "undefined"){
|
||||
uploadDataUrl = uploadDataUrl + '&tag4=' + encodeURIComponent(tag4)
|
||||
}
|
||||
if(tag5 != null && tag5 != "undefined"){
|
||||
uploadDataUrl = uploadDataUrl + '&tag5=' + encodeURIComponent(tag5)
|
||||
}
|
||||
|
||||
let uploadDataRes = await parentEpml.request("apiCall", {
|
||||
type: "api",
|
||||
|
Loading…
x
Reference in New Issue
Block a user