getEmbeddedFolderFile(folderPath, embeddedFilename) Last updated: 17. Oct 2026
Retrieves embedded file content from a folder's property file (.docly) by extracting and decoding the specified file data.
See also: Path traversal
Parameters
| Name | Type | Description |
|---|---|---|
| folderPath | string | The absolute path to the folder to read from the property file for. |
| embeddedFilename | string | The filename identifier of the embedded file to retrieve. |
Returns
A byte array with the file's content. null when the folder, its properties document or the embedded file does not exist, or when the path or id is invalid (.., a backslash, or characters not allowed in a file name).
Example
Code example (JS)
JS is normal JavaScript either running in the browser or on the Docly™ server.// Return an image stored on a folder's properties
const folderPath = '/Test files/folder 1';
const props = docly.getFolderProps(folderPath);
if (props != null && props.Image1) {
const bytes = docly.getEmbeddedFolderFile(folderPath, props.Image1);
if (bytes != null)
docly.downloadBytes(bytes, props.Image1, true); // true = show in the browser
}
return null;