Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Drive project export declares wrong data type #2797

Closed
tfmorris opened this issue Jun 23, 2020 · 0 comments · Fixed by #2829
Closed

Google Drive project export declares wrong data type #2797

tfmorris opened this issue Jun 23, 2020 · 0 comments · Fixed by #2829
Assignees
Labels
export Exporting a project to some format. Use the format-specific sub-label if available google Import / export from Google services Type: Bug Issues related to software defects or unexpected behavior, which require resolution.
Milestone

Comments

@tfmorris
Copy link
Member

The Export Project to Google Drive command creates a gzip compressed tar archive, but then uploads it to Google Drive without an extension and with a MIME type of application/zip which causes Google Drive to give it a zip extension on download.

FileProjectManager.gzipTarToOutputStream(project, fos);

FileContent projectContent = new FileContent("application/zip", filePath);

To Reproduce

Steps to reproduce the behavior:

  1. Export a project to Google Drive
  2. Go to Google Drive and download the resulting file
  3. Attempt to unzip the resulting file
  4. See error
Archive:  /Users/tfmorris/Downloads/Google Scholar highly cited researchers.zip
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.

Expected behavior

File is uploaded with the correct type.

@tfmorris tfmorris added Type: Bug Issues related to software defects or unexpected behavior, which require resolution. export Exporting a project to some format. Use the format-specific sub-label if available google Import / export from Google services labels Jun 23, 2020
tfmorris added a commit to tfmorris/OpenRefine that referenced this issue Jun 27, 2020
Fixes OpenRefine#2797. Changes mimetype from zip to gzip
and adds .tar.gz extension to the name.
wetneb pushed a commit that referenced this issue Jul 3, 2020
Fixes #2797. Changes mimetype from zip to gzip
and adds .tar.gz extension to the name.
@wetneb wetneb added this to the 3.5 milestone Jul 3, 2020
@tfmorris tfmorris self-assigned this Jul 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
export Exporting a project to some format. Use the format-specific sub-label if available google Import / export from Google services Type: Bug Issues related to software defects or unexpected behavior, which require resolution.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants