After uploading a file into dropbox, it looks like the v2 search API has a noticeable delay before the file will appear. I don't recall this issue with the v1 API, but its quite apparent now.
Repro steps:
1. Drag and drop a file into dropbox on Mac OSX and see checkbox indicating upload is completed.
For my tests I'm adding a .jpg file into /test/
2. Verify file appears in web interface for DropBox
3. Execute curl request as per dropbox api
curl -X POST https://api.dropboxapi.com/2/files/search \
--header "Authorization: Bearer [TOKEN HERE] " \
--header "Content-Type: application/json" \
--data "{\"path\": \"/test/\",\"query\": \"jpeg\",\"start\": 0,\"max_results\": 100,\"mode\": \"filename\"}"
Notice that search returns 0 results. After a period of time, it will then return the file uploaded in step 1.