Return a guessed mimetype for attached files

It seems the browser is sending a wrong mimetype, so we guess while
serving the file