Normally PostedFile.InputStream
and System.IO.Stream
are same.
So there is no need of any additional coding for Rackspace.
You can use file.InputStream as the Stream parameter to create the Object of Rackspace cloud files.
Another method which is not required but can test is
byte[] buffer = new byte[file.InputStream.Length];
file.InputStream.Seek(0, SeekOrigin.Begin);
file.InputStream.Read(buffer, 0, Convert.ToInt32(file.InputStream.Length));
Stream stream2 = new MemoryStream(buffer);
You can use this stream also as input for creating object.