/// <summary> /// 上传文件检查 /// </summary> /// <param name="file">文件信息</param> /// <param name="cfg">上传配置信息</param> public static void Check(HttpPostedFileBase file, string configName) { var cfg = UploadFileManager.GetUploadConfig(configName); Check(file, cfg); }
/// <summary> /// 保存上传文件 /// </summary> /// <param name="file">上传文件</param> /// <param name="fileName">保存文件名</param> /// <param name="configName">上传配置信息节点名称</param> /// <returns>返回地址</returns> public static string Save(HttpPostedFileBase file, string fileName, string configName) { var cfg = UploadFileManager.GetUploadConfig(configName); return(Save(file, fileName, cfg)); }
public static string Save(Stream stream, string fileName, string ext, string configName) { var cfg = UploadFileManager.GetUploadConfig(configName); return(Save(stream, fileName, ext, cfg)); }
/// <summary> /// 上传文件检查 /// </summary> /// <param name="file">文件信息</param> /// <param name="cfg">上传配置信息</param> public static void Check(IFormFile file, string configName) { var cfg = UploadFileManager.GetUploadConfig(configName); Check(file, cfg); }