mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-05-06 00:23:43 +08:00
Implemented MIMETypeForPathExtension for NSURL and NSString. refs #409
Refactored duplicated code for returning the MIME Type based on file path extension using Core Services UTI.
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#import "NSURL+RestKit.h"
|
||||
#import "NSDictionary+RKAdditions.h"
|
||||
#import "RKFixCategoryBug.h"
|
||||
#import "NSString+RestKit.h"
|
||||
|
||||
RK_FIX_CATEGORY_BUG(NSURL_RestKit)
|
||||
|
||||
@@ -30,4 +31,8 @@ RK_FIX_CATEGORY_BUG(NSURL_RestKit)
|
||||
return [NSDictionary dictionaryWithURLEncodedString:self.query];
|
||||
}
|
||||
|
||||
- (NSString *)MIMETypeForPathExtension {
|
||||
return [[self path] MIMETypeForPathExtension];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user