WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

How to see the progress of files which is getting uploadedΒ #1404

@Eldho1416

Description

@Eldho1416

I'm have been uploading a zipped file to drive using python and I'm not able to figure out how to see the progress of file which is getting uploaded. Is there anyway to see the progress bar, i'm attaching the part of code where i'm uploading the file.

Thanks

# Call the Drive v3 API
file_metadata = {
"name": os.path.basename(zipped_file),
"mimeType": "application/x-zip-compressed",
"parents": [self.folder_id]
}
media = MediaFileUpload(zipped_file, mimetype="application/zip", resumable=True)

file = (
service.files()
.create(body=file_metadata, media_body=media, fields="id")
.execute()
)
logger.info(f'File with ID: "{file.get("id")}" has been uploaded.')
  • Python version: Python 3.12.2
  • OS: Windows

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions