Additional Functions - disconnect user sessions or close the picker using the

The following functions are also available in the Javascript API. You can programmatically close the picker or disconnect your user's connected cloud sources.

Disconnect your user's cloud drives from Filestack

If your users work with sensitve information or share a computer with other users, you can now use the filepicker.logout() method to disconnect their cloud drive sessions after a successful upload or after an error.

Step 2. Deauthenticate Connected Sessions

Close the Filestack Dialog Programmatically

If your users have performed all of the actions you wanted them to perform, you can close the modal automatically. All methods which open the dialog modal now return an API object. The API object currently has only one method: .close

Sample Close Modal Code

Close Picker Dialog after 5 Seconds

// All methods which open the dialog modal now return an API object.
var dialog = filepicker.pick();
// This will close the modal automatically after 5 seconds.
setTimeout(function() {
dialog.close(); // This API object has only one method: dialog.close
}, 5000);