Function Updated 17 Oct 2026
getEmbeddedFolderFile(folderPath, embeddedFilename)
Retrieves embedded file content from a folder's property file (.docly) by extracting and decoding the specified file data.
See also Path traversal
Parameters
folderPathstringrequiredThe absolute path to the folder to read from the property file for.
embeddedFilenamestringrequiredThe filename identifier of the embedded file to retrieve.
This identifier must match the reference defined in the property file.
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
Normal JavaScript, 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;