1.匿名类
action = new UploadHandler(context, new UploadConfig() { AllowExtensions = Config.GetStringList("imageAllowFiles"), PathFormat = Config.GetString("imagePathFormat"), //设置上传图片的保存路径及文件名模板 SizeLimit = Config.GetInt("imageMaxSize"), UploadFieldName = Config.GetString("imageFieldName") });
2.
原文:http://www.cnblogs.com/zhuji/p/5133230.html