Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supporting encrypted upload for EncryptedBlobClient.upload(InputStream) with no length specified #34040

Merged
merged 7 commits into from
Mar 23, 2023

Conversation

ibrahimrabab
Copy link
Contributor

Description

resolves #32657

EncryptedBlobAsyncClient.upload() APIs could not support uploading InputStream if length was not specified and cause null pointer exception since BlobParallelUploadOptions.getLength() would return null.

Now adding checks (same logic as in BlobAsyncClient) for whether length is passed along with InputStream, and if not then we convert the Stream to a Flux<ByteBuffer> which will then be encrypted before uploading.

@ghost ghost added the Storage Storage Service (Queues, Blobs, Files) label Mar 16, 2023
@ibrahimrabab ibrahimrabab changed the title allowing encrypted upload for input stream with no length passed Supporting encrypted upload for EncryptedBlobClient.upload(InputStream) with no length specified Mar 16, 2023
@azure-sdk
Copy link
Collaborator

azure-sdk commented Mar 16, 2023

API change check

APIView has identified API level changes in this PR and created following API reviews.

azure-storage-common

@ibrahimrabab ibrahimrabab merged commit 55f695e into Azure:main Mar 23, 2023
@ibrahimrabab ibrahimrabab deleted the encryptedBlobISBug branch March 23, 2023 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EncryptedBlobAsyncClient- Upload blob- getting NullPointerException @BlobParallelUploadOptions.getLength
3 participants