Example #1
0
        public UploadUtility(StoreAreaForUpload area, CustomFileType fileType = CustomFileType.Image)
        {
            _siteConfig = new CustomSiteConfig(fileType);
            switch (area)
            {
            case (StoreAreaForUpload.ForVideo):
            {
                _siteConfig.AttachPath         = _siteConfig.AttachPath + "/Videos";
                _siteConfig.AttachImgMaxWidth  = 180;
                _siteConfig.AttachImgMaxHeight = 101;
                break;
            }

            case (StoreAreaForUpload.ForGallery):
            {
                _siteConfig.AttachPath += "/Gallery";
                break;
            }

            case (StoreAreaForUpload.ForBook):
            {
                _siteConfig.AttachPath        += "/Books";
                _siteConfig.ThumbnailWidth     = 250;
                _siteConfig.ThumbnailHeight    = 360;
                _siteConfig.AttachImgMaxWidth  = 500;
                _siteConfig.AttachImgMaxHeight = 720;
                break;
            }

            case (StoreAreaForUpload.ForArticle):
            {
                _siteConfig.AttachPath        += "/Articles";
                _siteConfig.AttachImgMaxWidth  = 500;
                _siteConfig.AttachImgMaxHeight = 280;
                break;
            }

            case (StoreAreaForUpload.ForNews):
            {
                _siteConfig.AttachPath        += "/News";
                _siteConfig.AttachImgMaxWidth  = 400;
                _siteConfig.AttachImgMaxHeight = 300;
                break;
            }

            case (StoreAreaForUpload.ForFeedback):
            {
                _siteConfig.AttachPath += "/Feedback";
                _siteConfig.AttachSave  = 3;
                break;
            }
            }
        }
Example #2
0
 public UploadUtility()
 {
     _siteConfig = new CustomSiteConfig(CustomFileType.Image);
 }