You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
app5000
8 years agoExplorer | Level 3
how to get file_id, file_size metadata using filename gotten from file chooser (python)
I have used dropbox file chooser to download files and filelinks. After I extract the filenames using the file chooser, I want to get more extended metadta.
To do that I first went through Oau...
- 8 years ago
I just took another look at your code, and I see you're trying to access the `size` returned by the Chooser, but per the documentation that should actually be `bytes`, so you can access it like `obj[0].bytes`.
The API v2 Python SDK's files_get_metadata method does accept a file ID in place of a path, so you can just call `dbx.files_get_metadata(fileID)`, where `fileID` is the file ID you got from the Chooser as `obj[0].id)`.
app5000
Explorer | Level 3
Good catch. I tried using var obj = files[0]; to get the first file and I was able to get the fileid. But the filesize is still empty. Is it possible to get filesize here? Maybe I can get it later using fileid.
I am trying to find instructions on getting metadata using fileid in python. program. You are so knowledgable, do you have any hints for me? I cannot pin point any good reads on it. Thanks again.
Q
Greg-DB
8 years agoDropbox Staff
I just took another look at your code, and I see you're trying to access the `size` returned by the Chooser, but per the documentation that should actually be `bytes`, so you can access it like `obj[0].bytes`.
The API v2 Python SDK's files_get_metadata method does accept a file ID in place of a path, so you can just call `dbx.files_get_metadata(fileID)`, where `fileID` is the file ID you got from the Chooser as `obj[0].id)`.
- app50008 years agoExplorer | Level 3
Thank you so much. You have been really helpful. I am able to get all the metadata I was looking for.
Regards,
Q
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,919 PostsLatest Activity: 23 days 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!