Hi guys,
Is it possible to force download of the feed output instead of rendering it in the browser?
I was thinking of something like ?ForceDownload=true
Thank you,
Adrian
Hi guys,
Is it possible to force download of the feed output instead of rendering it in the browser?
I was thinking of something like ?ForceDownload=true
Thank you,
Adrian
Hi Adrian,
Yes, that is possible ..
You can setup a "Scheduled task" with the Add-in "Feed File Export Task", as shown below ..
/Søren
Hi guys,
Thank you for the responses.
@Søren I know about that feature but in my case the feed is customer-specific. Which means that every customer will have a dynamically generated feed to include customer-specific prices. I cannot use the scheduled task for this.
@Oleg I will submit a feature request.
Thank you,
Adrian
You can do that by sending out some http headers that you add in your feed template.
Something like this:
context.Response.Cache.SetCacheability(HttpCacheability.NoCache);
context.Response.Cache.SetNoStore();
context.Response.Cache.SetExpires(DateTime.MinValue);
string contentDisposition = string.Format("attachment; filename=\"{0}\"", Path.GetFileName(context.Request.PhysicalPath));
string contentLength;
context.Response.ContentType = "application/octet-stream";
context.Response.AddHeader("Content-Disposition", contentDisposition);
context.Response.AddHeader("Content-Length", contentLength);
context.Response.AddHeader("Content-Description", "File Transfer");
Hi Nicolai,
Thank you for the suggestion.
I was considering IIS Rewrite for that but your solution seems a lot more controllable.
Thank you,
Adrian
You must be logged in to post in the forum