One month down in 2025: How are your resolutions coming along? Check out how to get back on track here.
Forum Discussion
hossamalamsto5
7 years agoNew member | Level 2
How to know upload progress to use it in QProgressBar (python)
this is my code please edit it to get the value of upload progress.
import pathlib import dropbox import re # the source file folder = pathlib.Path("C:\\Users\\Hossam\\Desktop\\test\\backup") # located in this folder filename = "20180911-183844.sql" # file name filepath = folder / filename # path object, defining the file # target location in Dropbox target = "/home/Apps/Sinapi" # the target folder targetfile = target + filename # the target path and file name # Create a dropbox object using an API v2 key d = dropbox.Dropbox('my_access') # open the file and upload it with filepath.open("rb") as f: # upload gives you metadata about the file # we want to overwite any previous version of the file meta = d.files_upload(f.read(), targetfile, mode=dropbox.files.WriteMode("overwrite"))
- Greg-DB
Dropbox Staff
The Dropbox Python SDK doesn't offer a way to track progress of uploads, but I'll pass this along as a feature request.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,950 PostsLatest Activity: 11 hours ago
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!