I am working on google sites and i want to allow users to upload files to my google drive using google picker API .
Below is my code :
var picker = new google.picker.PickerBuilder()
.enableFeature(google.picker.Feature.NAV_HIDDEN)
.enableFeature(google.picker.Feature.MULTISELECT_ENABLED)
.addView(new google.picker.DocsUploadView().setIncludeFolders(true))
.setOAuthToken(token)
.setDeveloperKey(DEVELOPER_KEY)
.setCallback(pickerCallback)
.setOrigin('https://script.google.com')
.setSize(DIALOG_DIMENSIONS.width - 2,
DIALOG_DIMENSIONS.height - 2)
.build();
picker.setVisible(true);
I could able to upload file using this code .But i want to restrict users to upload files to specific folders based on their roles/account(using their mail id).
i tried by share option for folders(OFF -Only specific people can access) in google drive.But it doesn't seems to work for Google Picker API.
If any one have any idea..please help..