Example #1
0
        private void ReadFileData(FileUploadInfo o, out byte[] file, out FileInfo fileInfo)
        {
            var fh = new FileUploadHandler(Server, Session, false, "~/Views/Shared/BlogViewTemplates");

            file     = null;
            fileInfo = null;
            if (o != null && o.FileName != null)
            {
                var filePath = fh.GetFilePhysicalPath(o.FileName);
                fileInfo = new FileInfo(filePath);
                file     = System.IO.File.ReadAllBytes(filePath);
            }
        }
Example #2
0
        private void ReadFileData(SimpleCMS.Models.FileUploadInfo o, out byte[] File, out FileInfo FileInfo)
        {
            var fh = new FileUploadHandler(Server, Session, false, "~/SimpleCMS/Data/Images");

            File     = null;
            FileInfo = null;
            if (o != null && o.FileName != null)
            {
                var FilePath = fh.GetFilePhysicalPath(o.FileName);
                FileInfo = new FileInfo(FilePath);
                File     = System.IO.File.ReadAllBytes(FilePath);
            }
        }