I am trying to export a docx file to zipped html using Google Drive API (Save as zipped html is one of the feature of google docs). But as per the documentation, supported export mime types are. https://developers.google.com/drive/manage-downloads
text/html
text/plain
application/rtf
application/vnd.oasis.opendocument.text
application/pdf
application/vnd.openxmlformats-officedocument.wordprocessingml.document
UPLOAD code
file = drive.files.insert.request_schema.new({
'title' => 'My document',
'description' => 'A test document',
'mimeType' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
}
)
media = Google::APIClient::UploadIO.new('gdoc.docx', 'application/msword')
result = client.execute(
:api_method => drive.files.insert,
:body_object => file,
:media => media,
:parameters => {
'uploadType' => 'multipart',
'convert' => 'true'
}
)
DOWNLOAD code
download_url = result.data.to_hash['exportLinks']['text/html']
html = client.execute(:uri => download_url)
Can anyone please tell me how can I export google doc to zipped html ?