document-picker icon indicating copy to clipboard operation
document-picker copied to clipboard

Try using get NSURL.getResourceValue and kCFURLTypeIdentifierKey to get UTI directly

Open dantman opened this issue 7 years ago • 0 comments

Right now in v3 we are getting the mimeType through a UTI (Apple's Universal Type Identifier) based on the file extension using the System's .ext -> UTI and UTI -> mimeType databases.

We should investigate whether using NSURL.getResourceValue with the kCFURLTypeIdentifierKey key on the URL returned by the document picker returns the UTI for that file directly.

If so this would be a more reliable method. Though we can still keep the old code as a fallback if it doesn't work.

dantman avatar Mar 14 '18 22:03 dantman