I'm learning swift , and I made a table with cells that show an image ,and classes in groups by MIME TYPE (using path extension).
I had a question about extensions.
If the images (for example, it could be a video or a pdf) are taken from internet , i'm not sure if they have the extension or not
how can I get the MIMEtype of a file inside my file System without using path extension ?
PS :Sorry for my bad english it's not my native language
Ios – Path extension and MIME type of file in swift
iosmime-typesswift
Best Answer
If anyone wants to get the MimeType from the actual URL of the file this code worked for me: