public FileContentResult ShowTemp(IContext context, string reference, string guid) { var log = new SysLogModel(context: context); var file = BinaryUtilities.DownloadTemp(context: context, guid: guid); log.Finish(context: context, responseSize: file?.FileContents.Length ?? 0); return(file); }
public FileContentResult DownloadTemp(string reference, string guid) { var log = new SysLogModel(); var file = BinaryUtilities.DownloadTemp(guid); log.Finish(file?.FileContents.Length ?? 0); return(file); }
public ActionResult ShowTemp(string reference, string guid) { var log = new SysLogModel(); var file = BinaryUtilities.DownloadTemp(guid); log.Finish(file?.FileContents.Length ?? 0); return(file != null ? File(file.FileContents, file.ContentType) : null); }
public FileContentResult ShowTemp(Context context, string reference, string guid) { var log = new SysLogModel(context: context); var file = BinaryUtilities.DownloadTemp(context: context, guid: guid); log.Finish(context: context, responseSize: file?.FileContents?.Length ?? 0); return(file != null ? new FileContentResult(System.Text.Encoding.UTF8.GetBytes(file.FileContents), file.ContentType) : null); }
public ActionResult ShowTemp(string reference, string guid) { var context = new Context(); var log = new SysLogModel(context: context); var file = BinaryUtilities.DownloadTemp(context: context, guid: guid); log.Finish(context: context, responseSize: file?.FileContents.Length ?? 0); return(file != null ? File(file.FileContents, file.ContentType) : null); }
public ActionResult DownloadTemp(string reference, string guid) { var context = new Context(); var log = new SysLogModel(context: context); var file = BinaryUtilities.DownloadTemp(context: context, guid: guid); if (file == null) { return(RedirectToAction("notfound", "errors")); } log.Finish(context: context, responseSize: file?.FileContents.Length ?? 0); return(file); }
public FileResult DownloadTemp(Context context, string reference, string guid) { var log = new SysLogModel(context: context); var file = BinaryUtilities.DownloadTemp(context: context, guid: guid); log.Finish(context: context, responseSize: file?.FileContents?.Length ?? 0); return(file?.IsFileInfo() == true ? (FileResult) new FilePathResult(file?.FileInfo.FullName, file?.ContentType) { FileDownloadName = file?.FileDownloadName } : (FileResult) new FileStreamResult(file?.FileContentsStream, file?.ContentType) { FileDownloadName = file?.FileDownloadName }); }