GetEmbeddedFile(path, id) Last updated: 28. Jun 2023

Get bytes of an embedded file (image or file upload) in a specific document.

Parameters

Name Type Description
path string Absolute path of Docly document to get embedded file size from.
id string ID of embedded file to get size from.

Returns

Array of bytes.

Example

Code example (#JS)

#JS is mixed HTML (or other text file) with inline JavaScript with # starting and ending each inline statement.
#{
    // Getting the embedded file size from file name
    let p = docly.getFile("Test files/Example file.xlsx");
    let fileId = p.File;
    let bytes = docly.getEmbeddedFile(p.Url, fileID);
    

}#