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

Send an Arbitrarily Large Stream to File Shares #278

Open
mdeangelo-CT opened this issue Jul 27, 2021 · 0 comments
Open

Send an Arbitrarily Large Stream to File Shares #278

mdeangelo-CT opened this issue Jul 27, 2021 · 0 comments

Comments

@mdeangelo-CT
Copy link

Which service(blob, file) does this issue concern?

File Shares

Which version of the SDK was used?

2.0.4

On which platform were you using? (.Net Framework version or .Net Core version, and OS version)

.NET Framework 4.8

How can the problem be reproduced? It'd be better if the code caused the problem can be shared.

Calling UploadAsync(Stream, CloudBlob, UploadOptions, SingleTransferContext, CancellationToken) with a Stream that does not have a Length (i.e. the Length property throws a NotImplementedException.)

What problem was encountered?

I am currently trying to upload a stream with an unknown length to Azure File Shares. These streams are large enough that they cannot be saved to disk. I am using TransferManager.UploadAsync(...) to do the upload. However, since my stream is without length it throws a NotImplementedException when being called from UploadAsync. It seems that this question has a known solution when uploading to Blobs, but not to File Shares.

Have you found a mitigation/solution?

If the Length property of a stream throws an exception, then can we allocate some arbitrarily sized chunks on the File Share and start uploading to those chunks? Once UploadAsync reaches the end of the stream, it would concatenate all of the chunks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant