Skip to main content
All CollectionsBest Practice GuidesFile Storage
File Export and Download Specification
File Export and Download Specification

Understand the valid file export formats for our File Storage integrations

Updated over a year ago

This help center article is intended to outline valid file export formats for the various file storage integrations Merge currently offers. The ability to specify file export formats is enabled through a new query parameter, mime_type, on the file download endpoint as specified in our docs here!

Usage

In order to export/download a file as a different file type, you can call our GET /files/{id}/download endpoint with an additional mime_type query parameter. The updated file download endpoint looks as follows:

GET /files/{id}/download?mime_type={type}

The mime_type being the query parameter/key, and type referring to the query parameter value/the export format the user wishes to download the specified file as.

To use a concrete example — if you would like to download a Google Document stored in your Google Drive as a word document, you can call the updated file download endpoint as follows:

GET /files/{id}/download?mime_type=docx

Supported Export Formats by Integration

The below tables show, for each integration, the source file type and supported export formats for that file type. For all integrations, please note the following:

  • At the moment, Google Drive is the only integration that we support specifying document export formats for, with support for other integrations on our product roadmap.

  • While the name of the query parameter specifying the export format is called mime_type, the actual parameter value being passed in must be a valid file extension based on the Supported Export Format/Mime Type Parameter Value table values shown below.

  • The document requested for export must be a valid exportable file based on the Document Type/Source Extension column shown below. If the source file cannot be exported, the file download endpoint will raise an exception message stating that the file cannot be exported based on the file type.

  • The requested export format must also be a valid and supported export format based on the Supported Export Format/Mime Type Parameter Value column shown in each table below. If an invalid mime_type value is passed in for export, the endpoint will throw an exception message stating that the requested export format is not supported for that file type.

  • The file requested for export must be a valid file type that Merge is able to support and process across all of our various file storage integrations.

Google Drive

Document Type

Format

Mime Type Parameter Value

Google Documents

Microsoft Word

docx

OpenDocument

odt

Rich Text

rtf

PDF

pdf

Plain Text

txt

Web Page (HTML)

zip

EPUB

epub

Google Spreadsheets

Microsoft Excel

xlsx

OpenDocument

ods

PDF

pdf

Web Page (HTML)

zip

Comma Separated Values (first-sheet only)

csv

Tab Separated Values (first-sheet only)

tsv

Google Presentations

Microsoft PowerPoint

pptx

ODP

odp

PDF

pdf

Plain Text

txt

Google Drawings

PDF

pdf

JPEG

jpg

PNG

png

Scalable Vector Graphics

svg

Integration-specific notes

  • The exported content is limited to 10MB, as specified by Google Drive API’s file export endpoint.

  • If an export mime type is not specified, and the file is exportable, then it will be exported as a PDF document by default.

  • The document requested for export must be one of the following Google Workspace documents: Google Docs (MIME type application/vnd.google-apps.document), Google Sheets (MIME type application/vnd.google-apps.spreadsheet), Google Slides (application/vnd.google-apps.presentation), Google Drawings (MIME type application/vnd.google-apps.drawing). If the MIME type of the source file is not included in one of the above, the endpoint will raise an exception message stating that the Google Workspace document cannot be exported.


Microsoft Sharepoint and Onedrive

Document Type/Source Extension

Supported Export Format / Mime Type Parameter Value

doc, docx, epub, eml, htm, html, md, msg, odp, ods, odt, pps, ppsx, ppt, pptx, rtf, tif, tiff, xls, xlsm, xlsx

pdf

3g2, 3gp, 3gp2, 3gpp, 3mf, ai, arw, asf, avi, bas, bash, bat, bmp, c, cbl, cmd, cool, cpp, cr2, crw, cs, css, csv, cur, dcm, dcm30, dic, dicm, dicom, dng, doc, docx, dwg, eml, epi, eps, epsf, epsi, epub, erf, fbx, fppx, gif, glb, h, hcp, heic, heif, htm, html, ico, icon, java, jfif, jpeg, jpg, js, json, key, log, m2ts, m4a, m4v, markdown, md, mef, mov, movie, mp3, mp4, mp4v, mrw, msg, mts, nef, nrw, numbers, obj, odp, odt, ogg, orf, pages, pano, pdf, pef, php, pict, pl, ply, png, pot, potm, potx, pps, ppsx, ppsxm, ppt, pptm, pptx, ps, ps1, psb, psd, py, raw, rb, rtf, rw1, rw2, sh, sketch, sql, sr2, stl, tif, tiff, ts, txt, vb, webm, wma, wmv, xaml, xbm, xcf, xd, xml, xpm, yaml, yml

jpg

eml, md, msg

html

cool, fbx, obj, ply, stl, 3mf

glb

Integration-specific notes

  • Not all files can be converted into all formats. In addition, there are known issues with HTML to PDF conversion, as noted in Microsoft OneDrive documentation here.


Dropbox

Document Type/Source Extension

Supported Export Format / Mime Type Parameter Value

paper

html, md

gdoc

pdf, jpg, png

gslides

pdf, jpg, png

Integration-specific notes

  • Not all files can be converted into all formats. Only files that cannot be downloaded directly can be exported.


Box

  • Box’s download file endpoint does not provide the ability to specify an alternative export/download format.

Did this answer your question?