edit files, recover the mime type