Upload files to application drive account via Picker API
Google Picker API enables to pick files from Google Drive account or upload files to Google Drive account. With few lines of javascript code one can create sofisticated file upload UI. How to include Google Picker <script src="http://www.google.com/jsapi></script> google.setOnLoadCallback(createPicker); google.load('picker', '1'); /** Create picker object. */ function createPicker() { // Use DocsUploadView to upload documents to Google Drive. var uploadView = new google.picker.DocsUploadView(); var picker = new google.picker.PickerBuilder(). addView(uploadView). setAppId("xxxxxxxxxxxxxxxxxx"). // setOAuthToken(ACCESS_TOKEN). setCallback(pickerCallback). build(); picker.setVisible(true); } /** A simple callback implementation. */ function pickerCallback(data) { if (data.action == google.picker.Action.PICKED) { var fileId = data.docs[0].id; alert('The user selecte...