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

[ch113786] Replace 'export_file' by 'http' to download Google Sheet files #15903

Merged

Conversation

Shylpx
Copy link
Collaborator

@Shylpx Shylpx commented Oct 26, 2020

Resources

Context

When a Google Drive file is stored in Google Sheet format, it must be exported in another format. Currently, we are using the export_file method when the file needs to be exported (the exported_links attribute is present when this happens). According to the documentation, this method:

Exports a Google Doc to the requested MIME type and returns the exported content. Please note that the exported content is limited to 10MB.

That hard-coded 10MB limitation is the reason why the import fails when the file is big and it is stored in Google Sheet format.

According to this question, an alternative is using the exported_links provided.

Changes

  • Use http method instead export_file because the first one has no file size limit.
  • Minor Rubocop fixes.

@Shylpx Shylpx requested a review from josemazo October 26, 2020 18:06
@Shylpx Shylpx self-assigned this Oct 26, 2020
Copy link

@josemazo josemazo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect! Working in a local environment for files smaller and larger than 10 MB! 💪

@amiedes amiedes merged commit 7abcbc9 into master Oct 27, 2020
@amiedes amiedes deleted the bug/ch113786/generali-error-1011-while-importing-a-dataset branch October 27, 2020 12:11
@thedae thedae mentioned this pull request Nov 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants