Skip to content

Function: isFileDocx()

ts
function isFileDocx(file: MwFile): boolean;

Defined in: src/file/mwFile.ts:254

Check if a file is a DOCX document.

Parameters

ParameterTypeDescription
fileMwFileThe MwFile to check.

Returns

boolean

true if the file MIME type matches the DOCX format, false otherwise.

Example

ts
const resume = convertBase64ToMwFile(data, 'resume.docx', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document');
if (isFileDocx(resume)) {
  console.log('Word document detected.');
}

Matterway Assistant SDK Documentation