From de2c2aa7788d19f53a645ebc28f27e5c691ff7fe Mon Sep 17 00:00:00 2001 From: Tom Morris Date: Fri, 3 Jul 2020 08:24:25 -0400 Subject: [PATCH] Correct mimetype for Google Drive project exports (#2829) Fixes #2797. Changes mimetype from zip to gzip and adds .tar.gz extension to the name. --- .../src/com/google/refine/extension/gdata/UploadCommand.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/gdata/src/com/google/refine/extension/gdata/UploadCommand.java b/extensions/gdata/src/com/google/refine/extension/gdata/UploadCommand.java index 4e06a5636..c4cdfb853 100644 --- a/extensions/gdata/src/com/google/refine/extension/gdata/UploadCommand.java +++ b/extensions/gdata/src/com/google/refine/extension/gdata/UploadCommand.java @@ -167,10 +167,10 @@ public class UploadCommand extends Command { contentHints.setThumbnail(tn); File fileMetadata = new File(); - fileMetadata.setName(name) + fileMetadata.setName(name + ".tar.gz") .setDescription(METADATA_DESCRIPTION) .setContentHints(contentHints); - FileContent projectContent = new FileContent("application/zip", filePath); + FileContent projectContent = new FileContent("application/x-gzip", filePath); File file = GoogleAPIExtension.getDriveService(token) .files().create(fileMetadata, projectContent) .setFields("id")