byte[] fileItemData = blobstoreService.fetchData(blobKey, 0, 999999);
ByteArrayContent mediaContent = new ByteArrayContent(fileItemMimeType, fileItemData);
insert = driveService.files().insert(body, mediaContent);
File file = insert.execute();
- >爲什麼insert.execute()不能捕獲異常...?什麼都不做。 - >當我離開「fileItemData」我得到一個項目在谷歌驅動器。那麼它有什麼問題?我正嘗試將其上傳到Google AppEngine並存儲到AppEngine上的Google Drive。從AppEngine Java保存字節[]到Google Drive
我很困惑,什麼是錯的 - 你在'insert.execute()'上得到一個異常?當你「離開」'fileItemData'時,你是什麼意思得到一個項目? – 2012-07-16 09:56:37
如果我插入沒有fileItemData - 對不起,我應該說mediaContent - >插入= driveService.files()。插入(身體); <我會看到在谷歌驅動器 – Malte 2012-07-16 18:55:49
條目我沒有得到一個例外......只是什麼都沒有發生時用mediacontent插入。 – Malte 2012-07-16 18:56:30