desides the extension by mime type