diff --git a/google-cloud-storage/src/main/java/com/google/cloud/storage/StorageImpl.java b/google-cloud-storage/src/main/java/com/google/cloud/storage/StorageImpl.java index fa16c9aed..ee538bcde 100644 --- a/google-cloud-storage/src/main/java/com/google/cloud/storage/StorageImpl.java +++ b/google-cloud-storage/src/main/java/com/google/cloud/storage/StorageImpl.java @@ -270,8 +270,7 @@ public Blob createFrom(BlobInfo blobInfo, Path path, int bufferSize, BlobWriteOp getOptions().asRetryDependencies(), retryAlgorithmManager.idempotent(), jsonResumableWrite); - HttpContentRange contentRange = - HttpContentRange.of(ByteRangeSpec.relativeLength(0L, size), size); + HttpContentRange contentRange = HttpContentRange.of(ByteRangeSpec.explicit(0L, size), size); ResumableOperationResult put = session.put(RewindableContent.of(path), contentRange); // all exception translation is taken care of down in the JsonResumableSession @@ -1724,8 +1723,7 @@ public BlobInfo internalCreateFrom(Path path, BlobInfo info, Opts put = session.put(RewindableContent.of(path), contentRange); // all exception translation is taken care of down in the JsonResumableSession