Skip to content

Commit d5cf726

Browse files
committed
Fix readAllBytes permission error on GAE (#1010)
1 parent 554b03e commit d5cf726

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

gcloud-java-storage/src/main/java/com/google/cloud/storage/spi/DefaultStorageRpc.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,8 +355,7 @@ public byte[] load(StorageObject from, Map<Option, ?> options) {
355355
.setIfGenerationMatch(IF_GENERATION_MATCH.getLong(options))
356356
.setIfGenerationNotMatch(IF_GENERATION_NOT_MATCH.getLong(options));
357357
ByteArrayOutputStream out = new ByteArrayOutputStream();
358-
getRequest.getMediaHttpDownloader().setDirectDownloadEnabled(true);
359-
getRequest.executeMediaAndDownloadTo(out);
358+
getRequest.executeMedia().download(out);
360359
return out.toByteArray();
361360
} catch (IOException ex) {
362361
throw translate(ex);

0 commit comments

Comments
 (0)