Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public ActionResult GeneratePPT(MyParams deckParams)
- {
- string template = Server.MapPath("/PPTTemplate.pptx");
- var results = _model.GeneratePPT(template);
- return File(results.Content, "application/vnd.ms-powerpoint", results.FileName);
- }
- using System;
- using System.Web.Mvc;
- using System.Net.Mime;
- namespace CoverageWebApp.Controllers
- {
- public class PttDownloaderController : Controller
- {
- public FileResult GeneratePPT(MyParams deckParams)
- {
- try
- {
- //do something with deckParams...
- string template = Server.MapPath("/PPTTemplate.pptx");
- var results = _model.GeneratePPT(template);// provide _model
- return File(results.Content, MediaTypeNames.Application.Octet, results.FileName);
- }
- catch (Exception)
- {
- return null;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement