---
category: [Administration & Integrations, Platform and Product Extensions, Platform and Product Extensions/Integration, Administration & Integrations/Custom Integrations & Apps, Platform and Product Extensions/Workday Extend]
keyword: [Extend, PMD Scripting, Scripts]
nav: wcp_docs
parent_url: /wcp_docs/
title: getFileType (fileName)
layout: subsection
---

## <a id="section_m3p_myb_5db"></a>Description

Returns the parsed mime type from the filename or null if not found. The `getFileType` function supports only these file extensions:

-   doc
-   docx
-   htm
-   html
-   pdf
-   rtf
-   txt


## <a id="section_cyq_j1m_zsb"></a>Return Type

`String`

## <a id="section_dz5_pwg_5db"></a>Namespace Function Syntax

```
fileType:getFileType(fileName)
```

<table><thead><tr><th>Parameter</th><th>Description</th></tr></thead><tbody><tr><td>fileName</td><td>The name of the file.</td></tr></tbody></table><br/>

<b>Example</b>

`fileType:getFileType('myFile.pdf')`

Returns `'application/pdf'`

