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();
source share