Skip to content

Instantly share code, notes, and snippets.

@aaadonai
aaadonai / DocumentType.swift
Created April 19, 2016 01:02
A Swift enum that recognizes basic mimetypes in a NSData
// Inspired by: http://stackoverflow.com/questions/4147311/finding-image-type-from-nsdata-or-uiimage/5042365#5042365
import Foundation
enum DocumentType: String {
case jpeg = "image/jpeg"
case png = "image/png"
case gif = "image/gif"
case tiff = "image/tiff"
### Keybase proof
I hereby claim:
* I am aaadonai on github.
* I am aaadonai (https://keybase.io/aaadonai) on keybase.
* I have a public key ASBUfGyrgSXLQr_-3hGskpa34CjCYyWw13ECtxIvv6UQBwo
To claim this, I am signing this object:
<?xml version="1.0" encoding="UTF-8"?><feed xmlns="http://www.w3.org/2005/Atom">
<title>antonio Twtxt Atom Feed</title>
<id>https://twtxt.net/user/antonio/twtxt.txt</id>
<updated>2020-08-12T03:38:35Z</updated>
<subtitle>iOS engineer living in SF. Working on an open source iOS client for twtxt</subtitle>
<link href="https://twtxt.net/user/antonio/twtxt.txt"></link>
<logo>https://twtxt.net/user/antonio/avatar.png</logo>
<author>
<name>antonio</name>
</author>