/** * Creates a new block blob, or updates the content of an existing block blob. * Updating an existing block blob overwrites any existing metadata on the blob. Partial updates are not * supported with PutBlob; the content of the existing blob is overwritten with the new content. To * perform a partial update of a block blob's, use PutBlock and PutBlockList. * For more information, see the * <a href="https://docs.microsoft.com/rest/api/storageservices/put-blob">Azure Docs</a>. * <p> * Note that the data passed must be replayable if retries are enabled (the default). In other words, the * {@code Flowable} must produce the same data each time it is subscribed to. * <p> * For more efficient bulk-upload scenarios, please refer to the {@link TransferManager} for convenience methods. * * @param data * The data to write to the blob. Note that this {@code Flowable} must be replayable if retries are enabled * (the default). In other words, the Flowable must produce the same data each time it is subscribed to. * @param length * The exact length of the data. It is important that this value match precisely the length of the data * emitted by the {@code Flowable}. * * @return Emits the successful response. * * @apiNote ## Sample Code \n * [!code-java[Sample_Code](../azure-storage-java/src/test/java/com/microsoft/azure/storage/Samples.java?name=upload_download "Sample code for BlockBlobURL.upload")] \n * For more samples, please see the [Samples file](%https://github.com/Azure/azure-storage-java/blob/master/src/test/java/com/microsoft/azure/storage/Samples.java) */ public Single<BlockBlobUploadResponse> upload(Flowable<ByteBuffer> data, long length) { return this.upload(data, length, null, null, null, null); }
/** * Creates a new block blob, or updates the content of an existing block blob. * Updating an existing block blob overwrites any existing metadata on the blob. Partial updates are not * supported with PutBlob; the content of the existing blob is overwritten with the new content. To * perform a partial update of a block blob's, use PutBlock and PutBlockList. * For more information, see the * <a href="https://docs.microsoft.com/rest/api/storageservices/put-blob">Azure Docs</a>. * <p> * Note that the data passed must be replayable if retries are enabled (the default). In other words, the * {@code Flowable} must produce the same data each time it is subscribed to. * <p> * For more efficient bulk-upload scenarios, please refer to the {@link TransferManager} for convenience methods. * * @param data * The data to write to the blob. Note that this {@code Flowable} must be replayable if retries are enabled * (the default). In other words, the Flowable must produce the same data each time it is subscribed to. * @param length * The exact length of the data. It is important that this value match precisely the length of the data * emitted by the {@code Flowable}. * * @return Emits the successful response. * * @apiNote ## Sample Code \n * [!code-java[Sample_Code](../azure-storage-java/src/test/java/com/microsoft/azure/storage/Samples.java?name=upload_download "Sample code for BlockBlobURL.upload")] \n * For more samples, please see the [Samples file](%https://github.com/Azure/azure-storage-java/blob/master/src/test/java/com/microsoft/azure/storage/Samples.java) */ public Single<BlockBlobUploadResponse> upload(Flowable<ByteBuffer> data, long length) { return this.upload(data, length, null, null, null, null); }
return blockBlobURL.upload(data, file.size(), optionsReal.httpHeaders(), optionsReal.metadata(), optionsReal.accessConditions(), null)
return blockBlobURL.upload(data, file.size(), optionsReal.httpHeaders(), optionsReal.metadata(), optionsReal.accessConditions(), null)