kopia lustrzana https://github.com/gaul/s3proxy
Write to OutputStream in azureblobsdk
stageBlock requires an InputStream that supports marks which the socket does not support and wrapping in a BufferedInputStream would require extra memory. Fixes #708.pull/702/head
rodzic
6185f2b46f
commit
6939e6f525
|
@ -365,8 +365,9 @@ public final class AzureBlobStore extends BaseBlobStore {
|
|||
.getBlockBlobClient();
|
||||
var blockId = makeBlockId(partNumber);
|
||||
var length = payload.getContentMetadata().getContentLength();
|
||||
try (var is = payload.openStream()) {
|
||||
client.stageBlock(blockId, is, length);
|
||||
try (var is = payload.openStream();
|
||||
var os = client.getBlobOutputStream()) {
|
||||
is.transferTo(os);
|
||||
} catch (IOException ioe) {
|
||||
throw new RuntimeException(ioe);
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue