Web api download file stream






















I can't figure out how to make the server take in the data via a stream. In my search for solutions I've come across a lot of examples with sockets and TCPClient, but that's not how we want to do it on this project. Can anybody help, please? What you want to do is copy the stream from one location to another, without loading it all into memory at once.

Something like this should work:. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams?

Collectives on Stack Overflow. Learn more. Send and receive large file over streams in ASP. Asked 4 years, 7 months ago. Active 3 years ago.

Viewed 27k times. Open, FileAccess. Create uri ; webRequest. Length; webRequest. DefaultCredentials; webRequest. Read fileData, 0, fileData. Length ; requestStream. Write fileData, 0, fileData. Write receivedBytes, 0, receivedBytes. Tobiuo Tobiuo 2 2 gold badges 3 3 silver badges 17 17 bronze badges.

April 11, at pm. Your email address will not be published. Save my name, email, and website in this browser for the next time I comment. Notify me of follow-up comments by email.

Notify me of new posts by email. About Utilities. MemoryStream To make a stream from stuff you have in memory, you use a MemoryStream. The following commands are used for creating the database and table:. Next Recommended Reading.

Visual Studio Vs Visual Studio Getting Started With. NET 6. C Evolution. Understanding Matplotlib With Examples. Understanding Numpy With Examples. Understanding Pandas With Examples.



0コメント

  • 1000 / 1000