1

I am uploading a file to Drive using the JS client, then trying to access that file from my server app by downloading its content. The server code is ...

HttpResponse resp = service.getRequestFactory().buildGetRequest(new GenericUrl(file.getDownloadUrl())).execute();

This works fine if the user has granted the all drive scope. However if the user only grants drive.file, the call fails with a 404 error.

If I look at the uploaded file using the Drive web page, it shows as being created by my app.

What do I need to do to read my uploaded file without drive scope?

My picker code is ...

tools.Constants.clientId = '694357857995';

var picker = new `google.picker.PickerBuilder()
.setAuthUser(cnU['email'])
.addView(uploadView)
.addView(view)
.setAppId(tools.Constants.clientId)
.enableFeature(google.picker.Feature.MULTISELECT_ENABLED)
.setCallback($scope.pickerCallback2)
.build();`
pinoyyid
  • 21,499
  • 14
  • 64
  • 115
  • drive.file should let you access file your app has created. Could you provide minimum code and procedure to reproduce this? – JunYoung Gwak Aug 15 '13 at 04:24
  • The server code is above. I've edited the question to also include the picker code. I've read http://stackoverflow.com/questions/17119557/getting-google-file-picker-to-work-with-drive-file-scope and have double checked that I am using the shortest form of client id. – pinoyyid Aug 15 '13 at 04:59

0 Answers0