Reputation: 105
I am using Google Drive picker (API), the drive has too many image files in it, whenever anyone opens the picker, thumbs keep loading, even after the files are selected and the picker is hidden, that eats up bandwidth very badly, I need to stop this behavior so as to save bandwidth, so I can either hide thumbs from the beginning, or tell the picker callback to stop loading thumbs, but I could not find a way for implementing any of these two approaches.
It is also worth mentioning that the picker loads original size image thumbnails (the thumbnails are just down-scaled original images, and consequently, their size is so huge, so imagine the bandwidth it takes to load a large number of thumbnails).
Upvotes: 0
Views: 301
Reputation: 3845
I see that the picker stops retrieving the thumbnails once I close it. However to reduce the amount of thumbnails, you could set the view mode to list. In this way the UI will show the elements in drive as a list and it will show the extension icon instead of the content thumbnails (eg, Spreasheets, docs, pdf, etc). As far as I have tested, only images and videos will show a thumbnail with the content of the file.
As all the files with the same extension will share the same icon, i think this will reduce the bandwidth it will take to load the files.
You can set this view as follows:
.addView(new google.picker.DocsView().setIncludeFolders(true).setMode(google.picker.DocsViewMode.LIST))
Hope this helps.
Upvotes: 1