java - Google Drive API getting an empty ByteArray when downloading/exporting files -


when trying export files drive pdf stream (from gdoc), empty inputstream byte array (it looks happens large files can't confirm!) :

inputstream mediacontent = service.files().export(fileid, mimetype).executemediaasinputstream(); if(!(mediacontent.available()>0)) {    throw new ioexception("media content empty, bytes expected"); } 

no exception thrown. can't see specified limits in documentation (https://developers.google.com/drive/v3/web/manage-downloads). there solution problem? known issue?

drive api : java client version v3-rev69-1.22.0

edit

through google oauth 2.0 playground request works fails (by failing mean returns http code 200 empty content!). when using resumable media download, empty inputstream byte array (chunks of 1mb) :

drive.files.export request = service.files().export(fileid, mimetype); request.getmediahttpdownloader().setprogresslistener(new customprogresslistener()); request.getmediahttpdownloader().setchunksize(constants.chunk_size); request.getmediahttpdownloader().setdirectdownloadenabled(false); inputstream mediacontent = request.executemediaasinputstream(); 

but not throw exception (return code 200 well). there solution?

if runs same problem : created ticket google cloud support , found conversion wasn't completed despite 200 response code. had mentioned conversion failed on timeout, because document big (conversion couldn't complete in time). recommend workaround split document parts before conversion until fix bug on side.

edit

last update google support :

engineers still investigating issue, there's no eta resolution , no significant progress made.


Comments

Popular posts from this blog

php - Permission denied. Laravel linux server -

google bigquery - Delta between query execution time and Java query call to finish -

python - Pandas two dataframes multiplication? -