How can you read a files MIME-type in objective-c
问题 I am interested in detecting the MIME-type for a file in the documents directory of my iPhone application. A search through the docs did not provide any answers. 回答1: It's a bit hacky, but it should work, don't know for sure because I'm just guessing at it There are two options: If you just need the MIME type, use the timeoutInterval: NSURLRequest. If you want the data as well, you should use the commented out NSURLRequest. Make sure to perform the request in a thread though, since it's