In Google Apps Script I am trying to create file with specified mime type. Creating file works but mime type is always 'application/vnd.google-apps.document'.
var file = {
'title': 'file.gs',
'mimeType': 'application/vnd.google-apps.script',
'parents': [{
'id': folder.getId()
}]
};
var fileGsContentBlob = Utilities.newBlob(fileGsContent);
var derp = Drive.Files.insert(file, calendarGsContentBlob);
return derp.mimeType; // returns always application/vnd.google-apps.document