コード例 #1
0
ファイル: EntityFileProvider.cs プロジェクト: qgate/CMS
        public EntityFileOperationResult Save(Models.EntityFile entityFile, string folderName)
        {
            var result = new EntityFileOperationResult();

            if (entityFile.Data.Length > 0)
            {
                var physicalPath = Path.Combine(DataDir.DataPhysicalPath, folderName, entityFile.FileName);
                var virtualPath  = UrlUtility.Combine(DataDir.DataVirutalPath, folderName, entityFile.FileName);
                entityFile.Data.SaveAs(physicalPath);

                result.PhysicalPath = physicalPath;
                result.VirtualPath  = virtualPath;
            }
            return(result);
        }
コード例 #2
0
ファイル: EntityFileProvider.cs プロジェクト: qgate/CMS
        public EntityFileOperationResult Save(Models.EntityFile entityFile, string folderName)
        {
            var result = new EntityFileOperationResult();
            if (entityFile.Data.Length > 0)
            {
                var physicalPath = Path.Combine(DataDir.DataPhysicalPath, folderName, entityFile.FileName);
                var virtualPath = UrlUtility.Combine(DataDir.DataVirutalPath, folderName, entityFile.FileName);
                entityFile.Data.SaveAs(physicalPath);

                result.PhysicalPath = physicalPath;
                result.VirtualPath = virtualPath;

            }
            return result;
        }