mime

1.0.0

This source code is now part of the Swift Web Standards library.
BinaryBirds/swift-mime

What's New

Initial release

2023-03-08T11:36:42Z

Very first public version

swift-mime

The swift-mime library can convert file extensions into possible MIME types.

Install command line utility

You can use the command line utility to convert file extensions into file MIME types on the fly.

$ git clone https://github.com/BinaryBirds/swift-mime.git && cd swift-mime
$ make install

$ mime txt 
$ # => text/plain

Library usage

You can use the Swift Package Manager as usual:

.package(url: "https://github.com/binarybirds/swift-mime", from: "1.0.0"),

.product(name: "MIME", package: "mime")

⚠️ Don't forget to add "MIME" to your target as a dependency!

import MIME

let mime = MIME()
let result = mime.getType(for: "txt")

print(result) // => text/plain

Useful resources

Description

  • Swift Tools 5.7.0
View More Packages from this Author

Dependencies

  • None
Last updated: Mon Jan 05 2026 19:37:34 GMT-1000 (Hawaii-Aleutian Standard Time)