Function: buildDownloadFilename()
function buildDownloadFilename(
candidatePath: string,
options?: BuildDownloadFilenameOptions
): string;
Defined in: utils/files/sanitizeFilename.ts:58
Builds a safe download name from an arbitrary path/label. If the source lacks
an extension, defaultExtension is appended after sanitisation. The result
is always safe to assign to the download attribute of an anchor element.
Parametersβ
candidatePathβ
string
options?β
BuildDownloadFilenameOptions = {}
Returnsβ
string