Skip to content

Function: mimeTypeFor() ​

ts
function mimeTypeFor(filename): string;

Defined in: src/core/formData/mimeType.ts:78

The content type for filename, or application/octet-stream when the extension is unknown or absent.

A leading dot is not an extension — .gitignore is a file called .gitignore, not a gitignore file.

Parameters ​

ParameterType
filenamestring

Returns ​

string