Exemplo n.º 1
0
        public static GeneretedResult GenerateImages(this HttpPostedFile file, string setting, DateTime uploadDate,
                                                     GenerateIdentityForImageHandler generateIdentityForImageHandler)
        {
            ImagesSetting imgSetting = new ImagesSetting();

            if (setting.ToLower().IndexOf("outputimageformat=pub,") != -1)
            {
                setting = setting.Replace("OutputImageFormat=pub", "OutputImageFormat=" + file.FileName.Substring(file.FileName.LastIndexOf('.') + 1));
            }

            imgSetting = setting.JsonTo(imgSetting);

            return(file.GenerateImages(imgSetting, uploadDate, generateIdentityForImageHandler));
        }
Exemplo n.º 2
0
 public static GeneretedResult GenerateImages(this HttpPostedFile file)
 {
     return(file.GenerateImages(new ImagesSetting(), DateTime.Now, GenerateIdentityForImage));
 }
Exemplo n.º 3
0
 public static GeneretedResult GenerateImages(this HttpPostedFile file, string setting)
 {
     return(file.GenerateImages(setting, DateTime.Now, GenerateIdentityForImage));
 }