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

files_search_v2 returns the same content_hash for all files despite being different file sizes #461

Open
jporcenaluk opened this issue Jan 27, 2023 · 1 comment
Labels

Comments

@jporcenaluk
Copy link

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

  1. Upload two files of differing sizes to Dropbox
  2. Run the below code or use the files_search_v2 function to return a list of files
  3. 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
image

Versions

  • dropbox version 11.36.0
  • python 3.11.0
  • OSX
@greg-db
Copy link
Contributor

greg-db commented Jan 27, 2023

Thanks for the report! We're investigating this API issue. I'll follow up here once I have an update.

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

No branches or pull requests

2 participants