Last post Apr 26, 2019 03:15 PM by PatriceSc
Apr 26, 2019 02:44 PM|RockChris|LINK
Hello friends, I have a website in .Net that returns a pdf, but I can not find the method that in my application of Córdoba when I click on a file but download this file automatically, Any help?
public HttpResponseMessage GetFile()
var rootPath = System.AppDomain.CurrentDomain.BaseDirectory;
var fileName = Path.Combine(rootPath, "archivos/pdf", "biologia.pdf");
HttpResponseMessage response = new HttpResponseMessage(HttpStatusCode.OK);
response.Content = new StreamContent(new FileStream(fileName, FileMode.Open, FileAccess.Read));
response.Content.Headers.ContentDisposition = new System.Net.Http.Headers.ContentDispositionHeaderValue("attachment");
response.Content.Headers.ContentDisposition.FileName = fileName;
Apr 26, 2019 03:15 PM|PatriceSc|LINK
A Cordova forum could be better. What happens for now ? It is based on a browser so I believe the user still have to confirm the download. As you don't tell what happens my guess is that you want to skip the download dialog and have this happen without any
user action once the link is clicked ???