Esempio n. 1
0
        public ActionResult DownloadFile(int fileId)
        {
            var fileInfo = _opdExpenseImageService.GetOpdExpensesImagesAgainstId(fileId);

            // Info.
            return(this.GetFile(fileInfo.ImageBase64, fileInfo.ImageExt));
        }
Esempio n. 2
0
        /// <summary>
        /// GET: /Img/DownloadFile
        /// </summary>
        /// <param name="fileId">File Id parameter</param>
        /// <returns>Return download file</returns>
        public ActionResult DownloadFile(int fileId)
        {
            // Model binding.

            try
            {
                // Loading dile info.
                var fileInfo = _opdExpenseImageService.GetOpdExpensesImagesAgainstId(fileId);

                // Info.
                return(this.GetFile(fileInfo.ImageBase64, fileInfo.ImageExt));
            }
            catch (Exception ex)
            {
                // Info
                Console.Write(ex);
            }

            // Info.
            return(View());
        }