the attachment to download
the JMap data source id
JMap.Attachment
.downloadToDevice(
{
id: "d9428888-122b-11e1-b85c-61cd3cbb3210",
organizationId: "c56a4180-65aa-42ec-a945-5fd21dec0538",
thumbnail: "",
fileId: "c56a4180-65aa-42ec-a945-5fd21dec0538",
fileName: "inspection.jpg",
fileSize: 481516,
mimeType: "image/jpeg"
},
"f47ac10b-58cc-4372-a567-0e02b2c3d479"
)
.then(() => console.log("Download started"))
.catch(error => console.error("Download failed", error))
JMap.Attachment.downloadToDevice
Triggers a browser download for the provided file attachment.