When inserting a new file in google drive sdk, there is no headRevisionId in the return object

when inserting a new file in google drive sdk There is no headRevisionId element in the return object

code example:

File file = drive.files().insert(body , mediaContent).execute(); headRevisionId = file.getHeadRevisionId(); 

will be null in headRevisionId

while the following code will return a value:

 File file = drive.files().insert(body , mediaContent).execute(); File file2 = file = gDriveApiClient.files().get(file.getId()).execute(); headRevisionId = file.getHeadRevisionId(); 
+4
source share
1 answer

This issue has been reproduced and presented. Sorry for the inconvenience.

0
source

Source: https://habr.com/ru/post/1496519/


All Articles