MIME type mapping API
Shell Swift Ruby Objective-C
Latest commit d30f6e9 Feb 3, 2016 @weekwood update readme
Permalink
Failed to load latest commit information.
Example
Pod
.gitignore
.travis.yml
LICENSE
README.md
SwiftMime.framework.zip
SwiftMime.podspec
_Pods.xcodeproj

README.md

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

Carthage

Add the following to your Cartfile:

github "weekwood/SwiftMime"

CocoaPods

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.