From c117eaf5a290fdf1238e62c3473beb4ba0096be2 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Mon, 19 Sep 2016 18:08:10 +0100 Subject: [PATCH] drive: add .epub, .odp and .tsv as export formats. --- docs/content/drive.md | 3 +++ drive/drive.go | 3 +++ 2 files changed, 6 insertions(+) diff --git a/docs/content/drive.md b/docs/content/drive.md index 03a8fd19e..2f038baf0 100644 --- a/docs/content/drive.md +++ b/docs/content/drive.md @@ -183,8 +183,10 @@ Here are the possible extensions with their corresponding mime types. | csv | text/csv | Standard CSV format for Spreadsheets | | doc | application/msword | Micosoft Office Document | | docx | application/vnd.openxmlformats-officedocument.wordprocessingml.document | Microsoft Office Document | +| epub | application/epub+zip | E-book format | | html | text/html | An HTML Document | | jpg | image/jpeg | A JPEG Image File | +| odp | application/vnd.oasis.opendocument.presentation | Openoffice Presentation | | ods | application/vnd.oasis.opendocument.spreadsheet | Openoffice Spreadsheet | | ods | application/x-vnd.oasis.opendocument.spreadsheet | Openoffice Spreadsheet | | odt | application/vnd.oasis.opendocument.text | Openoffice Document | @@ -193,6 +195,7 @@ Here are the possible extensions with their corresponding mime types. | pptx | application/vnd.openxmlformats-officedocument.presentationml.presentation | Microsoft Office Powerpoint | | rtf | application/rtf | Rich Text Format | | svg | image/svg+xml | Scalable Vector Graphics Format | +| tsv | text/tab-separated-values | Standard TSV format for spreadsheets | | txt | text/plain | Plain Text | | xls | application/vnd.ms-excel | Microsoft Office Spreadsheet | | xlsx | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | Microsoft Office Spreadsheet | diff --git a/drive/drive.go b/drive/drive.go index 74917b3b0..85de3ab0a 100644 --- a/drive/drive.go +++ b/drive/drive.go @@ -61,10 +61,12 @@ var ( RedirectURL: oauthutil.TitleBarRedirectURL, } mimeTypeToExtension = map[string]string{ + "application/epub+zip": "epub", "application/msword": "doc", "application/pdf": "pdf", "application/rtf": "rtf", "application/vnd.ms-excel": "xls", + "application/vnd.oasis.opendocument.presentation": "odp", "application/vnd.oasis.opendocument.spreadsheet": "ods", "application/vnd.oasis.opendocument.text": "odt", "application/vnd.openxmlformats-officedocument.presentationml.presentation": "pptx", @@ -78,6 +80,7 @@ var ( "text/csv": "csv", "text/html": "html", "text/plain": "txt", + "text/tab-separated-values": "tsv", } extensionToMimeType map[string]string )