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();`