DownloadEmbedded(file, embeddedId, [filename]) Last updated: 21. Mar 2023

API only function

Downloads an embedded file from a document.

Parameters

Name Type Description
file string Absolute path to document.
embeddedId string Id of embedded file to download.
filename (optional) string Supply filename to add as header.

Returns

Starts a file download immidiatelly in the API call and aborts further execution of code in the script.

Example

Code example (JS)

JS is normal JavaScript either running in the browser or on the Docly™ server.
// Downloads an embedded file from a document
docly.downloadEmbedded("somefile", fileGuid, "My file.pdf");