无法正确创建文件夹
Unable to create a folder properly
根据https://developers.google.com/drive/v2/web/folder,我只需要指定正确的 MIME 类型。但是:
metadata = Google::Apis::DriveV2::File.new title: "test",
content_type: "application/vnd.google-apps.folder",
parents: [{id: "0B0l....BUmM"}]
p service.insert_file(
metadata,
).mime_type
创建 "application/octet-stream"
而不是文件夹。
google-api-client (0.9)
在 Gemfile.lock
设置mime_type
,而不是content_type
。
根据https://developers.google.com/drive/v2/web/folder,我只需要指定正确的 MIME 类型。但是:
metadata = Google::Apis::DriveV2::File.new title: "test",
content_type: "application/vnd.google-apps.folder",
parents: [{id: "0B0l....BUmM"}]
p service.insert_file(
metadata,
).mime_type
创建 "application/octet-stream"
而不是文件夹。
google-api-client (0.9)
在 Gemfile.lock
设置mime_type
,而不是content_type
。