static void Main(string[] args) { string url = "http://*****:*****@"C:\temp\photo1.jpg"); FileStream stream2 = File.OpenRead(filePath); DocumentUpload document = new DocumentUpload { Author = "Marcin", Name = "Photo", Content = new MemoryStream() }; stream2.CopyTo(document.Content); client.AddLargeDocument(document); }