EncodeFilename(filename) Last updated: 13. Nov 2023

API only function

Encode a filename by replacing characters not allowed in filenames with their ASCII code representations. Reverse function of DecodeFilename.

Parameters

Name Type Description
filename string Filename to encode special chars.

Returns

Encoded filename, removes all symbols from filename.

Example

Code example (JS)

JS is normal JavaScript either running in the browser or on the Docly™ server.
let encodedFilename = docly.encodeFilename(query.file1);