Пример #1
0
        public static string Enctype(this ISchema schema)
        {
            var upload = schema.Columns.Select(it => string.IsNullOrEmpty(it.ControlType) ? null : ControlHelper.Resolve(it.ControlType)).Any(it => it != null && it.IsFile == true);

            return(upload ? "multipart/form-data" : "application/x-www-form-urlencoded");
        }