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

goodfall7's avatar
goodfall7
Explorer | Level 4
8 months ago

Serious problem of the Dropbox Chooser javascript

Hello!

I have a problem with the dropbox Chooser API.

 

https://www.dropbox.com/developers/chooser
https://www.dropbox.com/static/api/2/dropins.js <-- problem javascript

<script type="text/javascript" src="https://www.dropbox.com/static/api/2/dropins.js" id="dropboxjs" data-app-key="xxxxx"></script> <-- embed code

 

I have added "Chooser" javaScript to my dozens of web sites/pages. but recently errors started appearing.
All Window object functions before running "dropins.js" are overwritten.
So web page functions are broken.

When I looked at the "dropins.js" file... there was code that overwrites everything on the Window object. Isn’t this problematic code? Please make a fix.
========================
var W = window.Dropbox,
K = window,
F = o.Dropbox;
for (var q in F) K[q] = F[q]; <-- here
F.__esModule && Object.defineProperty(K, "__esModule", {
========================

Please do not overwrite existing web page functions.
There is no problem with Google Drive, One Drive, or Box javascript.
Only Dropbox overwrites existing functions.

For example, functions like "init()".

Dropbox.init ==> Window.init (Disables the existing “init” function on the webpage)

 

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    Thanks for the report! I'll have the team look into it.

    • Greg-DB's avatar
      Greg-DB
      Icon for Dropbox Staff rankDropbox Staff

      This should be fixed now. Please let us know if you're still seeing any issues. Thanks!

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,888 PostsLatest Activity: 21 minutes ago
326 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!