получение file.getDownloadUrl () как null, даже если я пробовал область как DriveScopes.DRIVE_READONLY и DriveScopes.all () - PullRequest
1 голос
/ 18 июня 2020

Я использовал как DriveScopes.DRIVE_READONLY, так и DriveScopes.all (), но все же получаю file.getDownloadUrl () как null.

private final static Collection<String> scopes=DriveScopes.all(); 

InputStream in=null;
if (file.getDownloadUrl() != null && file.getDownloadUrl().length() > 0) {
HttpResponse resp = drive.getRequestFactory().buildGetRequest(new 
GenericUrl(file.getDownloadUrl())).execute();
inputStrem = resp.getContent();
}
...