Reputation: 582
I have a WordPress plugin that retrieves documents from a user's Dropbox account using the Chooser API. When someone selects the files, the shared link to that file is included in a list that the plugin generates.
The plugin works exactly as expected in Firefox and Safari, but not in Chrome.
In Chrome, when I click the "Choose from Dropbox" button the window pops up as expected and I can see all of my files. I can select the files and click the Choose button as you would expect.
However once the Dropbox window closes I get a JavaScript error in the developer console, and no files are added to the list:
dropins.js: Uncaught TypeError: Failed to set the 'files' property on 'HTMLInputElement': The provided value is not of type 'FileList'.
I have tried this in Chrome's incognito mode with all extensions disabled, and even on several fresh installs of WordPress to see if there was an update to jQuery or some other dependency (using versions 4.5, 4.4.2, and 4.4) with no other active plugins and the default TwentySixteen theme.
This used to work in Chrome (I originally developed it using Chrome). So my thought is that something changed in either 1) the Dropbox API script (https://www.dropbox.com/static/api/1/dropins.js), or 2) Chrome's handling of the scripts that are being called. I can't recall which version of Chrome was active when I last had the plugin running successfully, but I'm using the latest version 50.0.2661.75 m right now.
Upvotes: 0
Views: 815
Reputation: 16940
This is a known issue that Dropbox is investigating. For reference, it looks like a bug in the Dropbox Drop-ins library and/or a change in Chrome's behavior. In either case, it would likely require some work on Dropbox's part to fix.
This only affects the old version 1 of the Chooser though, and we recommend upgrading to using the latest version (2) anyway:
https://www.dropbox.com/developers/chooser#js
Upvotes: 2