Download() public static méthode

Directly start the download for any given attachment. Calling this request will immediatly end the current request (if the file is found)
public static Download ( RequestAttachment request ) : string
request PerplexMail.Models.RequestAttachment The file (from the attachment) to send to the user
Résultat string
        public static string DownloadExcel()
        {
            if (!IsUmbracoAuthenticated)
            {
                return(null);
            }
            var request = FromURI <GetMailStatisticsRequest>();

            LogEmail.Download(request);
            return(null);
        }
        public static string DownloadAttachment()
        {
            if (!IsUmbracoAuthenticated)
            {
                return(null);
            }
            var request = FromBody <RequestAttachment>();
            var result  = LogEmail.Download(request);
            // Als je hier komt dan is er iets verkeerd gegaan
            var response = new AjaxResponse()
            {
                Message = result,
                Success = false,
            };

            return(Helper.ToJSON(response));
        }