9
Cómo configurar el nombre del archivo de descarga en la API web ASP.NET
En mi clase ApiController, tengo el siguiente método para descargar un archivo creado por el servidor. public HttpResponseMessage Get(int id) { try { string dir = HttpContext.Current.Server.MapPath("~"); //location of the template file Stream file = new MemoryStream(); Stream result = _service.GetMyForm(id, dir, file); if (result == null) { return Request.CreateResponse(HttpStatusCode.NotFound); …
140
c#
asp.net-web-api