Closed MichaKersloot closed 11 years ago
@jwagner79 Today the chooser didn't work anymore. I found out we do get a different structure back than stated in the documentation. I got an object in an array/object back from dropbox: console.log(files) ; [Array[1]] 0: Array[1] 0: Object bytes: 246000 icon: "https://www.dropbox.com/static/images/icons64/page_white_acrobat.png" link: "https://www.dropbox.com/s/gpng0qk1k67y5ds/Getting%20Started.pdf" name: "Getting Started.pdf"
console.log(files[0]) ; [Object] 0: Object bytes: 246000 icon: "https://www.dropbox.com/static/images/icons64/page_white_acrobat.png" link: "https://www.dropbox.com/s/gpng0qk1k67y5ds/Getting%20Started.pdf" name: "Getting Started.pdf"
I'm not sure that it is related, but I've found an issue on multiple files in the chooser, so maybe it is connected. https://forums.dropbox.com/topic.php?id=97323
@MichaKersloot Your right. I see the same on my end. Let me check with somebody at Dropbox to confirm that's not just an intermittent issue.
@MichaKersloot Looks like the issue is due to a change in the Dropbox file dropbox.js. We include that file in our Zimlet, but it's from Dropbox. That file has changed. I'll update dropbox.js instead of changing the file reference.
Fixed with changes to dropbox.js
@MichaKersloot Thanks, but I'm not sure I understand the change. Looking at the documentation: https://www.dropbox.com/developers/chooser
The files parameter in the above success callback function will be an array of file objects, each with metadata about the selected file in the following format:
files = [ { "name": "file.txt", "link": "https://...", "bytes": 464, "icon": "https://...", "thumbnails": {"64x64": "https://...", "200x200": "https://..."} } ]
Looks like your code is suggesting that we are getting a different structure back. Can you elaborate?