cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Tell us what you want to see on the Community here!
Close

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

can't use javascript SDK with Chooser

Highlighted

can't use javascript SDK with Chooser

Explorer | Level 3

Following "Dropbox JavaScript SDK vs Dropbox saver JavaScript" I can tell that Greg's solution there is not robust. The order of the script tags makes a difference, and some functions inside these libs don't work no matter what the order is, for example:

Uncaught TypeError: Dropbox.isBrowserSupported is not a function

Why isn't don't the libraries use a more robust namespace technic, at least use a better name than Dropbox for the global variable?

5 Replies 5
Highlighted

Re: can't use javascript SDK with Chooser

Dropboxer

Thanks for the feedback! These two components weren't designed to be used together, so efforts weren't made to make sure they don't conflict. The JavaScript SDK can be used to replace all of the functionality offered by the Chooser for instance (except for the UI itself), so you may want to just use that. I'll send this along as a request to make it easier and more robust to use both though.

Also, regarding the 'TypeError', do you also get that when you try to use the Chooser (dropins.js) only, without the SDK as well?

Highlighted

Re: can't use javascript SDK with Chooser

Explorer | Level 3

The error is only when I mix the to libs

Highlighted

Re: can't use javascript SDK with Chooser

Dropboxer

I see, thanks for the information. When you get that, are you using my workaround that you linked to? 

I was able to use `Dropbox_Dropins.isBrowserSupported()` fine, regardless of script tag order, but I could reproduce the issue with `Dropbox.isBrowserSupported()` when loading the SDK second. If you're calling like `Dropbox.isBrowserSupported()`, please try using `Dropbox_Dropins.isBrowserSupported()` instead.

Highlighted

Re: can't use javascript SDK with Chooser

Explorer | Level 3

I am not calling isBrowserSupported(), it's being called internally

Highlighted

Re: can't use javascript SDK with Chooser

Dropboxer

I see, thanks for clarifying. I can't offer a workaround for that unfortunately. I've submitted this as a request to the team to offer an officially supported way of making this work though, so I'll follow up here if/when that's implemented.

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?