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
Beatso
5 years agoExplorer | Level 4
Create sharing link after file upload
I'm using the Javascript SDK, and code uploads some files, creating their parent folders, then creates a sharing link of one of the parent folders. But because javascript is asyncronous, the files ha...
- 5 years ago
The calls in the JavaScript SDK are asynchronous as you mentioned, so if you have additional operation(s) to perform that depend on the result of an earlier call, you should only perform the additional operation(s) once the necessary earlier ones have completed. You can do so by only triggering the later operations once you get the response back from the earlier one.
With the Dropbox JavaScript SDK, you can run code from inside the response function for an API call. So, in this example for instance, that would mean you trigger the next API call from inside the "function(response)" set in the ".then", like how that example appends a message to an element on the page.
Greg-DB
Dropbox Staff
The calls in the JavaScript SDK are asynchronous as you mentioned, so if you have additional operation(s) to perform that depend on the result of an earlier call, you should only perform the additional operation(s) once the necessary earlier ones have completed. You can do so by only triggering the later operations once you get the response back from the earlier one.
With the Dropbox JavaScript SDK, you can run code from inside the response function for an API call. So, in this example for instance, that would mean you trigger the next API call from inside the "function(response)" set in the ".then", like how that example appends a message to an element on the page.
Beatso
5 years agoExplorer | Level 4
thanks!
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,915 PostsLatest Activity: 2 days 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!