We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
Ashrafali
4 years agoExplorer | Level 4
Set the timeout to close the chooser after few seconds of selecting the files or
Once user choose the files and click the submit button in web application dropbox chooser I'm downloading the files in my backend by calling ajax function in success option of the chooser, if the fil...
Ashrafali
4 years agoExplorer | Level 4
Thankyou, I got it but is there any option to close it? or hide it? If there is no options then I have different approach for that but just wants to know if there is any option to close or hide.
Здравко
4 years agoLegendary | Level 20
Ashrafali, I'm wrong in my previous post. Seems 'success' callback is called asynchronously. That's why it can't stop/delay chooser disappearance.
To be honest I can't reproduce your issue. 🤔 Can you share some code sniped representing it?
- Greg-DB4 years ago
Dropbox Community Moderator
For reference, I can reproduce this, but only in some browsers (e.g., Chrome but not Firefox), so there seems to be some browser-specific implementation details that affect this.
In any case, it still sounds like the right solution here is to move the long work out of the callback.
- Здравко4 years agoLegendary | Level 20
Greg-DB wrote:...
In any case, it still sounds like the right solution here is to move the long work out of the callback.
Yes, one simple "fix" (might not be the best in all cases) can be replace function declaration like:
success: function(files) {to something like:
success: async function(files) {And yes, on Firefox it works with and without 'async'. I hope it will work on Chrome too (haven't tested it yet).
Good luck Ashrafali!
About Discuss Dropbox Developer & API
Make connections with other developers
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If 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, Facebook or Instagram.
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!
Related Content
- 4 years agoAnonymous