Google drive api uploaded file but return 500 error

前端 未结 2 1037
既然无缘
既然无缘 2021-01-26 07:17

I\'m uploading file to google drive by using service account. And It worked w/o any problem for a while. And it started giving 500 error from 2 days ago.

W/Syste         


        
2条回答
  •  不知归路
    2021-01-26 07:38

    Well, It's fixed by removing 'thumbnailLink' field. I used to work but started to giving error about a week ago.

    From

    Drive.Files.Create insert = drive.files().create(fileMetadata, mediaContent)
                .setFields("id,mimeType,thumbnailLink,webContentLink,webViewLink");
    

    To

    Drive.Files.Create insert = drive.files().create(fileMetadata, mediaContent)
                .setFields("id,mimeType,webContentLink,webViewLink");
    

提交回复
热议问题