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

Alternative Google Drive Export #2243

Closed
odinian opened this Issue Apr 12, 2018 · 7 comments

Comments

Projects
None yet
2 participants
@odinian

odinian commented Apr 12, 2018

When exporting (copy, copyto, sync) Google Drive files that are too large for the API export command, the files are not exported.

This appears to me a known issue with the published Google API. It can’t seem to export files larger that 5MB, might be 10MB (or some unspecific size; Google won’t say).

https://issuetracker.google.com/issues/36761333

And this might be a better (or alternative) api call for copying from G Suite, if the file is too large. Maybe a "alt_fallback" switch in the command.

https://docs.google.com/presentation/d/FILE_ID/export/pptx
The downside is the file type has to be known. Files types are:
doc
txt
html
odt
pptx
odd
jpg
png
svg

plus some more for spreadsheets and drawings. Credit to https://www.labnol.org/internet/direct-links-for-google-drive/28356/

@odinian

This comment has been minimized.

odinian commented Apr 12, 2018

I was asked specifically (by ncw), in 2235, to open a separate ticket for this.

ncw added a commit that referenced this issue Apr 16, 2018

@ncw ncw added this to the v1.41 milestone Apr 16, 2018

ncw added a commit that referenced this issue Apr 16, 2018

@ncw ncw closed this in 311a962 Apr 21, 2018

@ncw ncw reopened this Apr 21, 2018

ncw added a commit that referenced this issue Apr 21, 2018

@ncw

This comment has been minimized.

Owner

ncw commented Apr 21, 2018

Here is a beta fix for you to try

https://beta.rclone.org/v1.40-113-g0912186a-fix-2243-drive-export/ (uploaded in 15-30 mins)

This exports all the docs using those URLs you linked.

Can you test if it works please?

And also I'd like your opinion on whether rclone should use the new URLs always or whether it should be via a flag!

Thanks

PS I'm sure I posted this already - It seems to have disappeared though...

@odinian

This comment has been minimized.

odinian commented Apr 21, 2018

I will try on Monday. I would suggesting using the published API's as the default, then have a flag to try the alternate API if the published API fails. I'm not sure what the implications of using the unpublished API are, and therefore should probably be avoided unless necessary.

Alternatively, use the published API by default and fall back to the unpublished API when the files failed to download, with no flag.

It all depends on the implications of using the unpublished API.

@odinian

This comment has been minimized.

odinian commented Apr 23, 2018

Ok, I tried with the one large Slides presentation, and it worked.

@ncw ncw modified the milestones: v1.41, v1.42 Apr 28, 2018

@ncw ncw closed this in f073db8 May 11, 2018

@ncw

This comment has been minimized.

Owner

ncw commented May 11, 2018

I've added a --drive-alternate-export flag to enable this.

Here is a beta with it in

https://beta.rclone.org/v1.41-042-g63f413f4/ (uploaded in 15-30 mins)

This will be in the latest beta from now on and and in v1.42

@odinian

This comment has been minimized.

odinian commented May 14, 2018

I just tried the beta, and it seems to work. One questions. When using the --drive-alternate-export flag, does it use the alternative for every download, or only when the published API fails with a "too large" error?

@ncw

This comment has been minimized.

Owner

ncw commented May 16, 2018

@odinian it uses it for all downloads.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment