Forum Discussion

Ashrafali's avatar
Ashrafali
Explorer | Level 4
3 years ago

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 file is too large then the chooser stays open for few minutes (even after user selects and submit the files) untill the whole video gets downloaded in backend, is there any option to close the popup of chooser after few seconds, so that download continue in the background and user will not be confused that why the webpage is stuck.

  • Здравко's avatar
    Здравко
    Legendary | Level 20

    Ashrafali wrote:
    ..., if the file is too large then the chooser stays open ...

    Hi Ashrafali,

    Do you perform file operations in chooser's callback or let it return before (or immediately after) start processing? 🧐 Take in mind that chooser will stay blocked as much as you block it's execution within the callback. 😉 Make your processing little more asynchronous.

    Hope this gives direction.

    • Ashrafali's avatar
      Ashrafali
      Explorer | 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.
      • Greg-DB's avatar
        Greg-DB
        Icon for Dropbox Staff rankDropbox Staff

        Ashrafali No, there isn't an option to close or hide it explicitly. It will automatically close. As Здравко said, it sounds like the issue here is that you're blocking the callback. You should move your operations out of the callback as they said, so that it will automatically close quickly.

About Discuss Dropbox Developer & API

Node avatar for Discuss Dropbox Developer & API
Make connections with other developers804 PostsLatest Activity: 3 days ago
217 Following

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 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!