changed mimeType to mediaType