Function API only Updated 17 Oct 2026
getUploadBase64(targetFileName)
Returns an uploaded file, picked by its form field name, as a base64 encoded string.
Parameters
targetFileNamestringrequiredThe form field name the file was posted in — the Name property from getUploads, not the file name.
Returns
The first non-empty file posted in that form field, as a base64 encoded string. null when there is no such file or the name is empty.
Example
Normal JavaScript, running in the browser or on the Docly™ server.
let uploads = docly.getUploads();
for(let upload of uploads)
{
let data = docly.getUploadBase64(upload.Name);
// Do something with the data, maybe save it as an embedded attachment?
}