Maybe also search for the file and verify the mime type is on the search result?