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

upload: add callback #54

Open
KengoSawa2 opened this issue Sep 6, 2020 · 2 comments
Open

upload: add callback #54

KengoSawa2 opened this issue Sep 6, 2020 · 2 comments

Comments

@KengoSawa2
Copy link

Hello

Thank you for development and contributions of PyDrive2:)

I want to upload a huge zip file by PyDrive2.
When I looked into the API, GetContents() has a callback for progress.
But UpLoad() does not.

https://gsuitedevs.github.io/PyDrive/docs/build/html/pydrive.html#pydrive.files.GoogleDriveFile.Upload

Are you planning to add a callback to show the upload progress?
Progress is a very important feature as I plan to upload a zip close to 750GB of single file

Related:
#49 (comment)

@efiop efiop changed the title Hope for additional features: Upload progress callback upload: add callback Sep 15, 2020
@efiop
Copy link
Contributor

efiop commented Sep 15, 2020

Hi @KengoSawa2 !

Take a look at https://github.com/iterative/dvc/blob/5e69e29b2f0e3df9b9eab5d682988fd01121b015/dvc/tree/gdrive.py#L362 , where we wrap the fobj we are uploading into a tqdm progress bar.

Indeed, it would be great to have an explicit callback argument to handle that, but we don't currently have plans to introduce it ourselves. That being said, we would be happy to accept/help out if anyone is willing to contribute such a feature.

@efiop efiop added enhancement New feature or request feature request and removed enhancement New feature or request labels Sep 15, 2020
@TheManchineel
Copy link

Hi @KengoSawa2 !

Take a look at https://github.com/iterative/dvc/blob/5e69e29b2f0e3df9b9eab5d682988fd01121b015/dvc/tree/gdrive.py#L362 , where we wrap the fobj we are uploading into a tqdm progress bar.

Indeed, it would be great to have an explicit callback argument to handle that, but we don't currently have plans to introduce it ourselves. That being said, we would be happy to accept/help out if anyone is willing to contribute such a feature.

So if I understand correctly, what's happening here is that you're tracking what parts of the file have been read by PyDrive?

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

No branches or pull requests

3 participants