Google Picker API DocsUploadView setIncludeFolders

2019-09-15 18:21发布

I have the following :

        var uploadView = new google.picker.DocsUploadView().setIncludeFolders(true);

        var picker = new google.picker.PickerBuilder().
            addView(uploadView).
            setOAuthToken(oauthToken).
            setDeveloperKey(googleDeveloperKey).
            setCallback(uploadPickerCallback).
            build();

        picker.setVisible(true);

In no place during the process does it ask for the destination, it just uploads to the root and closes the dialog once the file is done uploading.

1条回答
Ridiculous、
2楼-- · 2019-09-15 19:01

This problem is caused by a long-standing bug with the Picker API. For more information, see https://groups.google.com/forum/#!topic/google-picker-api/xaHcET7JYLw.

The work-around is to enable multi-select, as described in the docs at https://developers.google.com/picker/docs/reference#Feature.

picker.enableFeature(google.picker.Feature.MULTISELECT_ENABLED);
查看更多
登录 后发表回答