I know that a similar question was asked here, however I still can't get this work since my case is a bit different. I want to be able to create a folder in google drive by using the google-drive-ruby gem.
According to Google (https://developers.google.com/drive/folder) when using the "Drive" Api you can create a folder by inserting a file with mime-type "application/vnd.google-apps.folder"
e.g.
POST https://www.googleapis.com/drive/v2/files
Authorization: Bearer {ACCESS_TOKEN}
Content-Type: application/json
...
{
"title": "pets",
"parents": [{"id":"0ADK06pfg"}]
"mimeType": "application/vnd.google-apps.folder"
}
In my case I want to be able to do the same thing but when using the google_drive API. It has the upload_from_file option which accepts the mime-type option, however this still doesn't work for me, the best result that I got so far was when executing the following code was this error message from Google.
session.upload_from_file("test.zip", "test", :content_type => "application/vnd.google-apps.folder")
"Mime-type application/vnd.google-apps.folder is invalid. Files cannot be created with Google mime-types.
I'll appreciate if you can give me any suggestions.