Add mimetype detection