passing mimetype properly