1

When I upload presentations .pptx using the SDK, logs show that all bytes are sent, but to open them in google drive ths slides appears with errors, however if I upload the same presentation in .ppt, has not problem and appears well on google drive, using the resumable upload, this is the code.

byte[] myFile = readImageData(blobKey,size);
ByteArrayContent mediaContent = new ByteArrayContent(mimeType, myFile);

Drive.Files.Insert insert = service.files().insert(body, mediaContent);
insert.getMediaHttpUploader().setChunkSize(1024 * 1024);
File file = insert.execute();

UPDATE

But if i use

insert.setConvert(true);

the presentations .pptx has not problem and appears well on google drive.

4

0 に答える 0