Skip to main content
Active ⭐️⭐️⭐️
Jun 1, 2021 10:53 AM UTC
Solved

Download documents from AssetMeta (Gearbox.js) component.

Hi, does anyone know how I can download files from AssetMeta and / or AssetDocumentsPanel component? Are there other options for retrieving documents related to an asset?
Principal Support Engineer
Jun 2, 2021 7:26 PM UTC

Hi Sujan,

You should be able to retrieve the following values from “handleDocumentClick” in  “AssetDocumentsPanel component”

{
"id": ,
"name": "",
"directory": "",
"mimeType": "PDF",
"metadata": {
"Status": "Active",
"location": ""
},
"source": "string",
"assetIds": [

],
"uploaded": true,
"uploadedTime": "",
"createdTime": "",
"lastUpdatedTime": ""
}

Since we don't have a file download component implemented in Gearbox at the moment, you should be able to pass a download function on “handleDocumentClick” and download a file.

 

Thanks,

Shehan Karunaratne.

1 reply

Principal Support Engineer
Jun 2, 2021 7:26 PM UTC

Hi Sujan,

You should be able to retrieve the following values from “handleDocumentClick” in  “AssetDocumentsPanel component”

{
"id": ,
"name": "",
"directory": "",
"mimeType": "PDF",
"metadata": {
"Status": "Active",
"location": ""
},
"source": "string",
"assetIds": [

],
"uploaded": true,
"uploadedTime": "",
"createdTime": "",
"lastUpdatedTime": ""
}

Since we don't have a file download component implemented in Gearbox at the moment, you should be able to pass a download function on “handleDocumentClick” and download a file.

 

Thanks,

Shehan Karunaratne.