Skip to content

Commit

Permalink
fixup! Avoid blob copy when saving byte arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
blackheaven committed Jul 2, 2019
1 parent 30dc0b9 commit 088123b
Showing 1 changed file with 2 additions and 3 deletions.
Expand Up @@ -134,9 +134,8 @@ private Mono<BlobId> save(BucketName bucketName, InputStream data, BlobId id) {
.then(Mono.fromCallable(() -> blobIdFactory.from(hashingInputStream.hash().toString())));
}

private Mono<String> save(BucketName bucketName, Blob blob) {
String containerName = this.containerName.value();
return Mono.fromCallable(() -> blobStore.putBlob(containerName, blob));
private Mono<Void> save(BucketName bucketName, Blob blob) {
return Mono.fromRunnable(() -> putBlobFunction.putBlob(blob));
}

@Override
Expand Down

0 comments on commit 088123b

Please sign in to comment.