cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
What’s new: end-to-end encryption, Replay and Dash updates. Find out more about these updates, new features and more here.

Discuss Dropbox Developer & API

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Content Hash Searchv2

Content Hash Searchv2

lr00429
Explorer | Level 4

Hello,

I am working on an app that allows users to upload files using the dropbox api. There is a requirement to check duplicates per folder for this I am searching for the file name that they are uploading for the folder that they are uploading to, if I get a match I can create the content hash and comparing to what I get from search. However, I noticed that SearchV2 returns the same content hash no matter what the file is. SearchV1 does not have this issue. I am currently calling get metadata on match of name because I do not want to user searchV1 but would love to get this fixed so I don't have to make an additional callout.

11 Replies 11

Greg-DB
Dropbox Staff

Thanks for the report. I just tried this out though, and I'm not seeing the behavior you describe. Can you share the particular call and output you're making so we can take a look? Be sure to redact the access token and any private information though. Feel free to open an API ticket if you'd prefer to share privately. Thanks in advance!

lr00429
Explorer | Level 4

Hey Greg,

 

Sure thing, here is a few screenshots. 1. being the content_hash example file (https://www.dropbox.com/developers/reference/content-hash) showing the correct hash in searchV1. Then a screenshot of search V2 with the same file showing a different hash. Lastly, a completely different installation file showing the same hash using searchv2. We experience this with all searchV2 queries where we get the same hash for all files. 

 

 

Thanks!

Screenshot 2022-07-25 at 11.10.44 AM.png

Screenshot 2022-07-25 at 11.16.43 AM.png

 

Screenshot 2022-07-25 at 11.11.43 AM.png

   

Greg-DB
Dropbox Staff

Thanks, that's helpful. We'll look into it and I'll follow up here once I have any update on this for you.

ericmayhew
New member | Level 2

I am also having this issue.  Is there any update on this?

Greg-DB
Dropbox Staff

@ericmayhew I don't have any news on this right now. I'll follow up here once I do.

alexlarocca
Explorer | Level 3

I can confirm the reported issue. All the items returned by search v2 have the same content hash.

 

{
	"has_more": false,
	"matches": [
		{
			"match_type": {
				".tag": "filename"
			},
			"metadata": {
				".tag": "metadata",
				"metadata": {
					".tag": "file",
					"client_modified": "2022-02-13T21:21:05Z",
					"content_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
					"id": "id:bmQ2zNCCK9YAAAAAAAA3Xw",
					"is_downloadable": true,
					"name": "cartella.jpg",
					"path_display": "/wls-jpg globale/cartella.jpg",
					"path_lower": "/wls-jpg globale/cartella.jpg",
					"rev": "015d7ece0b49bc9000000020972d360",
					"server_modified": "2022-02-13T21:21:05Z",
					"sharing_info": {
						"modified_by": "dbid:AADrJsQIfdIogCxH_JrNNSC1tM81Kcgv8SI",
						"parent_shared_folder_id": "8748454752",
						"read_only": false
					},
					"size": 15802
				}
			}
		},
		{
			"match_type": {
				".tag": "filename"
			},
			"metadata": {
				".tag": "metadata",
				"metadata": {
					".tag": "file",
					"client_modified": "2022-02-13T21:21:09Z",
					"content_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
					"id": "id:bmQ2zNCCK9YAAAAAAAA3Zg",
					"is_downloadable": true,
					"name": "cartello.jpg",
					"path_display": "/wls-jpg globale/cartello.jpg",
					"path_lower": "/wls-jpg globale/cartello.jpg",
					"rev": "015d7ece0ebb0b0000000020972d360",
					"server_modified": "2022-02-13T21:21:09Z",
					"sharing_info": {
						"modified_by": "dbid:AADrJsQIfdIogCxH_JrNNSC1tM81Kcgv8SI",
						"parent_shared_folder_id": "8748454752",
						"read_only": false
					},
					"size": 6610
				}
			}
		},
		{
			"match_type": {
				".tag": "filename"
			},
			"metadata": {
				".tag": "metadata",
				"metadata": {
					".tag": "file",
					"client_modified": "2022-02-13T21:21:01Z",
					"content_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
					"id": "id:bmQ2zNCCK9YAAAAAAAA3WQ",
					"is_downloadable": true,
					"name": "carte.jpg",
					"path_display": "/wls-jpg globale/carte.jpg",
					"path_lower": "/wls-jpg globale/carte.jpg",
					"rev": "015d7ece078ad33000000020972d360",
					"server_modified": "2022-02-13T21:21:01Z",
					"sharing_info": {
						"modified_by": "dbid:AADrJsQIfdIogCxH_JrNNSC1tM81Kcgv8SI",
						"parent_shared_folder_id": "8748454752",
						"read_only": false
					},
					"size": 11162
				}
			}
		},
		{
			"match_type": {
				".tag": "filename"
			},
			"metadata": {
				".tag": "metadata",
				"metadata": {
					".tag": "file",
					"client_modified": "2022-02-13T21:21:09Z",
					"content_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
					"id": "id:bmQ2zNCCK9YAAAAAAAA3ZQ",
					"is_downloadable": true,
					"name": "cartello-4.jpg",
					"path_display": "/wls-jpg globale/cartello-4.jpg",
					"path_lower": "/wls-jpg globale/cartello-4.jpg",
					"rev": "015d7ece0ebb0af000000020972d360",
					"server_modified": "2022-02-13T21:21:09Z",
					"sharing_info": {
						"modified_by": "dbid:AADrJsQIfdIogCxH_JrNNSC1tM81Kcgv8SI",
						"parent_shared_folder_id": "8748454752",
						"read_only": false
					},
					"size": 21126
				}
			}
		},
		{
			"match_type": {
				".tag": "image_content"
			},
			"metadata": {
				".tag": "metadata",
				"metadata": {
					".tag": "file",
					"client_modified": "2018-05-21T17:47:25Z",
					"content_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
					"id": "id:bmQ2zNCCK9YAAAAAAAABsw",
					"is_downloadable": true,
					"name": "ThinkstockPhotos-467270716.jpg",
					"path_display": "/altri simboli/primi/ThinkstockPhotos-467270716.jpg",
					"path_lower": "/altri simboli/primi/thinkstockphotos-467270716.jpg",
					"rev": "015d7fb10438938000000020972d360",
					"server_modified": "2022-02-14T14:16:33Z",
					"sharing_info": {
						"modified_by": "dbid:AADrJsQIfdIogCxH_JrNNSC1tM81Kcgv8SI",
						"parent_shared_folder_id": "8748454752",
						"read_only": false
					},
					"size": 75278
				}
			}
		},
		{
			"match_type": {
				".tag": "filename"
			},
			"metadata": {
				".tag": "metadata",
				"metadata": {
					".tag": "file",
					"client_modified": "2022-02-13T21:21:05Z",
					"content_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
					"id": "id:bmQ2zNCCK9YAAAAAAAA3YA",
					"is_downloadable": true,
					"name": "cartellino rosso.jpg",
					"path_display": "/wls-jpg globale/cartellino rosso.jpg",
					"path_lower": "/wls-jpg globale/cartellino rosso.jpg",
					"rev": "015d7ece0b49bca000000020972d360",
					"server_modified": "2022-02-13T21:21:05Z",
					"sharing_info": {
						"modified_by": "dbid:AADrJsQIfdIogCxH_JrNNSC1tM81Kcgv8SI",
						"parent_shared_folder_id": "8748454752",
						"read_only": false
					},
					"size": 10686
				}
			}
		},
		{
			"match_type": {
				".tag": "filename"
			},
			"metadata": {
				".tag": "metadata",
				"metadata": {
					".tag": "file",
					"client_modified": "2022-02-13T21:21:05Z",
					"content_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
					"id": "id:bmQ2zNCCK9YAAAAAAAA3XA",
					"is_downloadable": true,
					"name": "cartella me.jpg",
					"path_display": "/wls-jpg globale/cartella me.jpg",
					"path_lower": "/wls-jpg globale/cartella me.jpg",
					"rev": "015d7ece0b49bc6000000020972d360",
					"server_modified": "2022-02-13T21:21:05Z",
					"sharing_info": {
						"modified_by": "dbid:AADrJsQIfdIogCxH_JrNNSC1tM81Kcgv8SI",
						"parent_shared_folder_id": "8748454752",
						"read_only": false
					},
					"size": 14679
				}
			}
		},
		{
			"match_type": {
				".tag": "filename"
			},
			"metadata": {
				".tag": "metadata",
				"metadata": {
					".tag": "file",
					"client_modified": "2022-02-13T21:21:09Z",
					"content_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
					"id": "id:bmQ2zNCCK9YAAAAAAAA3Yw",
					"is_downloadable": true,
					"name": "cartello-2.jpg",
					"path_display": "/wls-jpg globale/cartello-2.jpg",
					"path_lower": "/wls-jpg globale/cartello-2.jpg",
					"rev": "015d7ece0ebb0ad000000020972d360",
					"server_modified": "2022-02-13T21:21:09Z",
					"sharing_info": {
						"modified_by": "dbid:AADrJsQIfdIogCxH_JrNNSC1tM81Kcgv8SI",
						"parent_shared_folder_id": "8748454752",
						"read_only": false
					},
					"size": 12443
				}
			}
		},

Greg-DB
Dropbox Staff

@alexlarocca Thanks for the note. This issue is still open with engineering. I'll follow up here once I have an update on it.

Hoteam Soft
Explorer | Level 3

 I have the same issue.

alexlarocca
Explorer | Level 3

I guess you already knows that e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 is the hash of an empty file

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Hoteam Soft Explorer | Level 3
  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    alexlarocca Explorer | Level 3
What do Dropbox user levels mean?