Skip to content

[mime]: support custom MIME types #10918

@2dragonly

Description

@2dragonly

Since experimental (x-) and vendor-specific (vnd.) MIME types are excluded, please support adding custom MIME types.

We need a way to register them globally so they are available package-wide:

// index.ts
import { mimeTypes } from "@remix-run/mime"

mimeTypes["swf"] = "application/x-shockwave-flash"
// detect.ts
import { detectContentType } from "@remix-run/mime"

detectContentType("swf") // Should detect the new type

This should also ensure the new types are detected correctly in other packages like @remix-run/response

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions