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

Make sure stream position is set to zero #71

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Alkaersig
Copy link

I ran into an issue in Umbraco Cloud where a file operation was working fine locally but not when pushed to Cloud. Looking into the logs Azure threw an exception:
System.ArgumentException: content.Position must be less than content.Length. Please set content.Position to the start of the data to upload.

The problem was obviously the position of the stream i was trying to write, but the same code was working just fine locally, so i guessed this was being handled by the PhysicalFileProvider and looking into it this turned out to be the case. So to stream line this behaviour it makes sense for the Azure Storage Provider to do the same (see: https://github.com/umbraco/Umbraco-CMS/blob/v14/dev/src/Umbraco.Core/IO/PhysicalFileSystem.cs#L182C1-L185C14)

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

Successfully merging this pull request may close these issues.

1 participant