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
shripaldalal
9 months agoNew member | Level 2
Dropbox API Search Not Working
We have integrated the API with our ERP system, where we can upload files prefixed by the document number. So one document can have multiple files. SAMEX_23-24_0937_PDF1.pdf SAMEX_23-24_0937_PDF...
shripaldalal1
Explorer | Level 3
Funny thing is it asks me to take a new community username everytime, yesterday I posted as shripaldalal, today I had to compulsorily take shripaldalal1. What a nightmare.
<script src="https://cdnjs.cloudflare.com/ajax/libs/dropbox.js/4.0.30/Dropbox-sdk.min.js"></script>
This is the API.
function getFiles() {
var dbx = new Dropbox.Dropbox({
accessToken: ACCESS_TOKEN
});
dbx.filesSearch({ path: '', query: '"2324-CBB-PV00177"_' })
.then(function(response) {
console.log('response', response);}
})
.catch(function(error) {
console.log('Error', error);
alert('Error! Please check log!');
});
}
Before I got all files that started with 2324-CBB-PV00177, now I get only one file that starts with 2324-CBB-PV00177.
The worse is the same problem is in Chooser as well.
I can't post the HTML so the code is a bit haphazard apologise for the same.
Greg-DB
9 months agoDropbox Staff
I see you've actually posted from two different accounts. You use your Dropbox account to access the forum, so it looks like you have two different Dropbox accounts, and used different ones to sign in and post your two forum comments so far. That would explain why you had to set the username again.
Also, since it looks like you're working with multiple different accounts, can you double check that you're signed in to the right account when when performing these searches? For the API, you can check which account you're connected to by calling usersGetCurrentAccount. In the Chooser, you can check using the button in the lower left, and on the web site you can check using the button in the upper right. Make sure you're signed in to the correct account with the expected files in each case.
Anyway, I notice that your query parameter value seems to have some extra " characters around the actual search string, as well as a trailing _. Can you try again without those extra characters and share the output?
- shripaldalal18 months agoExplorer | Level 3
The special characters " " is to do an exact search. It's written in your documentation itself. The problem it was working perfectly just one week back. I don't know what's suddenly gone wrong. Please look into it.
It does not even work with chooser. So if I do "SHRIPAL DALAL" it shows all files containing this string on the website. But if I do it in chooser it shows only one file containing this string in the chooser.
It's become a nightmare for us now.
- iNeil8 months agoDropbox Engineer
Hello shripaldalal1, thank you for reporting this case and the additional information! We'll look into it, and I'll follow up here once I have any news on this.
- Greg-DB8 months agoDropbox Staff
shripaldalal1 Please check the search functionality again now. If you're still seeing the issue, please open an API ticket here while signed in to the specific account that is seeing the issue, and share the following information:
- an exact query that currently isn't working as expected
- the full results you're currently getting for that query
- the full path of a file that is expected but currently missing from the results
That would help us make sure we're investigating the correct and current state of the issue in the correct account. Thanks!
- iNeil7 months agoDropbox Engineer
Hello shripaldalal,
The engineering team has located and fixed the issue with searching files and folders. Please let us know if you need further assistance with this case.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,888 PostsLatest Activity: 5 minutes agoIf 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!