dropbox-sdk-python
dropbox-sdk-python copied to clipboard
files_search_v2 returns the same content_hash for all files despite being different file sizes
Describe the bug
files_search_v2
returns the same content_hash
in the FileMetadata
for each file even though they have different file sizes.
To Reproduce
- Upload two files of differing sizes to Dropbox
- Run the below code or use the
files_search_v2
function to return a list of files - Observe that the content_hash value is the same for all files
import dropbox
from dropbox.files import SearchOptions
fun_path = "path_to_folder_in_dropbox"
fun_token = "dropbox_token"
dbx = dropbox.Dropbox(fun_token)
all_files = dbx.files_search_v2(
query=".", options=SearchOptions(path=fun_path)
).matches
metadata = [{"hash": entry.metadata.get_metadata().content_hash, "size": entry.metadata.get_metadata().size } for entry in files_a]
metadata
Expected Behavior
- I expect to see different content_hash values for different files
Actual Behavior
- I see the same content_hash values for different files
Screenshots
Versions
- dropbox version 11.36.0
- python 3.11.0
- OSX
Thanks for the report! We're investigating this API issue. I'll follow up here once I have an update.
This should be fixed now. Thanks again for the report!