Skip to content

mikengyn/SwiftMime

 
 

Repository files navigation

SwiftMime

Version Stories in Ready Build Status

Comprehensive MIME type mapping API. Includes all 600+ types and 800+ extensions defined by the Apache project, plus additional types submitted by the node.js community.

inspired from mime

Usage

Basic API

SwiftMime.sharedManager.lookupExtension("text/html")
SwiftMime.sharedManager.lookupType("pdf")

Custom mime type

SwiftMime.sharedManager.define([
	"text/x-some-format": ["x-sf", "x-sft", "x-sfml"],
  	"application/x-my-type": ["x-mt", "x-mtt"]
])
SwiftMime.sharedManager.lookupType("pdf")

Installation

Add the following to your Cartfile:

github "weekwood/SwiftMime"

Add the following to your Podfile:

pod 'SwiftMime'

Author

di wu, di.wu@me.com

License

SwiftMime is available under the MIT license. See the LICENSE file for more info.

About

MIME type mapping API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 61.9%
  • Swift 26.6%
  • Ruby 7.2%
  • Objective-C 4.3%