diff --git a/src/helpers/config.ts b/src/helpers/config.ts index 8fdc237..5ae91f4 100644 --- a/src/helpers/config.ts +++ b/src/helpers/config.ts @@ -252,6 +252,8 @@ export const CONTENT_TYPES = { json: 'application/json', mp4: 'video/mp4', textPlain: 'text/plain', + model: 'model/gltf-binary', + audio: 'audio/mpeg', }; export const AR_WALLETS = [{ type: WalletEnum.arConnect, logo: ASSETS.wallets.arconnect }]; @@ -345,9 +347,11 @@ export const RENDERERS = { '3d': { label: '3D', domain: 'view_3d-pst', + contentType: CONTENT_TYPES.model, }, audio: { label: 'Audio', domain: 'audio-renderer', + contentType: CONTENT_TYPES.audio, }, }; diff --git a/src/views/Upload/index.tsx b/src/views/Upload/index.tsx index c82a312..0987122 100644 --- a/src/views/Upload/index.tsx +++ b/src/views/Upload/index.tsx @@ -374,16 +374,24 @@ export default function Upload() { : uploadReducer.data.description ? uploadReducer.data.description : stripFileExtension(data.file.name); - const type = data.file.type; const balance = uploadReducer.data.useFractionalTokens ? Number(uploadReducer.data.contentTokens) : 1; + let contentType = data.file.type; + if ( + (!contentType || !contentType.length) && + uploadReducer.data.renderer && + uploadReducer.data.renderer.includes('3d') + ) { + contentType = CONTENT_TYPES.model; + } + try { const assetTags: TagType[] = [ - { name: TAGS.keys.contentType, value: type }, + { name: TAGS.keys.contentType, value: contentType }, { name: TAGS.keys.creator, value: arProvider.profile.id }, { name: TAGS.keys.ans110.title, value: title }, { name: TAGS.keys.ans110.description, value: description }, - { name: TAGS.keys.ans110.type, value: type }, + { name: TAGS.keys.ans110.type, value: contentType }, { name: TAGS.keys.ans110.implements, value: TAGS.values.ansVersion }, { name: TAGS.keys.dateCreated, value: dateTime }, { name: 'Action', value: 'Add-Uploaded-Asset' },