About 87,000 results
Open links in new tab
  1. Send and receive large file over streams in ASP.NET Web Api C#

    Apr 28, 2017 · I'm using the ASP.NET Web Api to communicate between client and server. My client has a "SendFile" method which I believe works fine, but I don't know how to make my …

  2. How to return a file (FileContentResult) in ASP.NET WebAPI

    In a regular MVC controller, we can output pdf with a FileContentResult. var stream = new MemoryStream(); //... add content to the stream. return File(stream.GetBuffer(), …

  3. c# - Return file in ASP.Net Core Web API - Stack Overflow

    Apr 4, 2017 · I want to return a file in my ASP.Net Web API Controller, but all my approaches return the HttpResponseMessage as JSON. var response = new …

  4. Upload files in ASP.NET Core | Microsoft Learn

    Sep 27, 2024 · Upload large files with streaming. The 3.1 example demonstrates how to use JavaScript to stream a file to a controller action. The file's antiforgery token is generated using …

  5. ASP. NET Core on .NET 7.0 - File upload and streams using Minimal API

    Apr 1, 2022 · It seems the Minimal API that got introduced in ASP.NET Core 6.0 will now be finished in 7.0. One feature that was heavily missed in 6.0 was the File Upload, as well as the …

  6. Serving video file / stream from ASP Net Core 6 Minimal API

    Feb 8, 2022 · In the Asp.net core Minimal API application, you can use the Results.File to return file to download from your minimal APIs handler, like this: app.MapGet("/video", (int id) => { …

  7. Uploading Large Files in ASP.NET Core - Code Maze

    Jul 3, 2024 · In this article, we are going to learn how to handle uploading large files in ASP.NET Core. We are going to talk about why using byte[] or MemoryStream can be problematic and …

  8. ASP.NET Core Web API–Returning a FileStream

    May 31, 2019 · So you can easily put your data in to a stream, but then you need to return it in the right way from the WebAPI. To return a file stream, you can use a FileStreamResult. This lets …

  9. ASP.NET Core – How to receive a file in a web API request

    Dec 9, 2021 · IFormFile exposes the file content as a stream. You can save this to disk by creating a FileStream and copying the file stream to it. Here’s an example of saving the file to …

  10. How to Upload Large Files in ASP.NET Core Using S3 Multipart …

    Apr 6, 2025 · With that done, let’s create the .NET 9 Web API project. This Web API will be responsible for the following, Initiates the multipart upload, and retuns the upload id back to …

Refresh