When you use MemoryStream to upload an object with OSS SDK for .NET, the upload succeeds but the object size shows as 0. This happens because the default file pointer position in MemoryStream is at the end of the stream. When OSS reads from the current pointer position, it reads zero bytes.

Solution
Before calling the upload method, reset the file pointer to the beginning of the stream:
mStream.Seek(0, SeekOrigin.Begin);The following example shows a complete upload using MemoryStream with the pointer reset applied:

After adding mStream.Seek(0, SeekOrigin.Begin), OSS reads the full stream content and the object size is displayed correctly.
