Example #1
0
        protected string ServerMapFolder(string resourceType, string folderPath, bool isQuickUpload)
        {
            TypeConfig config = this.Config.TypeConfig[resourceType];
            string     path   = isQuickUpload ? config.GetQuickUploadDirectory() : config.GetFilesDirectory();

            Util.CreateDirectory(path);
            return(Path.Combine(path, folderPath.TrimStart(new char[] { '/' })));
        }
Example #2
0
        protected string ServerMapFolder(string resourceType, string folderPath, bool isQuickUpload)
        {
            TypeConfig typeConfig = this.Config.TypeConfig[resourceType];

            // Get the resource type directory.
            string sResourceTypePath = isQuickUpload ? typeConfig.GetQuickUploadDirectory() : typeConfig.GetFilesDirectory();

            // Ensure that the directory exists.
            Util.CreateDirectory(sResourceTypePath);

            // Return the resource type directory combined with the required path.
            return(System.IO.Path.Combine(sResourceTypePath, folderPath.TrimStart('/')));
        }