---
schema_version: "1"
id: a337f20481aaef22d480a23f86e9f1aa3fe9f3c40c41ca98698243a74abe2e35
title: MIME Types Permitted
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/lwc/lightning-components-security/guides/locker/locker-js-mime.md
canonical_url: https://developer.salesforce.com/docs/platform/lightning-components-security/guide/locker-js-mime.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 8c02c30b0cf2f7ba309aab7a5e3f89bd2e9a802bd969ac17fc29626eac6c228c
products:
  - Security for Lightning Components
  - lwc
---
# MIME Types Permitted

Lightning Locker analyzes the MIME types used in Blob objects. Locker permits some MIME types, sanitizes some MIME types, and blocks the rest.

Lightning Locker allows these MIME types.

- `application/octet-stream` — Default value for binary files
- `application/json` — JSON format
- `application/pdf` — Portable Document Format (.pdf)
- `video/` — All `video/*` mime types
- `audio/` — All `audio/*` mime types
- `image/` — All `image/*` mime types
- `font/` — All `font/*` mime types
- `text/plain` — Text (.txt)
- `text/markdown` — Markdown (.md)
- `application/zip` — Zip archive (.zip)
- `application/x-bzip` — Bzip archive (.bz)
- `application/x-rar-compressed` — RAR archive (.rar)
- `application/x-tar` — Tape archive (.tar)

Locker sanitizes `text/html`, `image/svg+xml`, and `text/xml` MIME types. These types are permitted but Locker removes potentially malicious code.

Any other types are blocked with the error message `Unsupported MIME type`.

To send binary files that aren't explicitly permitted, specify the MIME type as `application/octet-stream`.

Lightning Locker doesn't support the specification of MIME type parameters.

**tip:** Lightning Web Security (LWS) requires you to specify the MIME type. See [Specify a MIME Type for Blob Objects in LWS](https://developer.salesforce.com/docs/platform/lightning-components-security/lws/lws-mime.md).
