Added mimetype processing