/// <summary> /// 批量更改文件mime /// </summary> /// <param name="request"></param> /// <returns></returns> public List <ChangeMimeResultDto> ChangeMimeRange(ChangeMimeRangeParam request) { new ChangeMimeRangeParamValidator().Validate(request).Check(HttpStatus.Err.Name); List <ChangeMimeResultDto> mimeResultList = new List <ChangeMimeResultDto>(); request.Keys.ForEach(key => { mimeResultList.Add(string.IsNullOrEmpty(request.MimeType) ? new ChangeMimeResultDto(false, key, "请输入文件MimeType") : ChangeMime(new ChangeMimeParam(key, request.MimeType, request.PersistentOps))); }); return(mimeResultList); }
/// <summary> /// 批量更改文件mime /// </summary> /// <param name="request"></param> /// <returns></returns> public List <ChangeMimeResultDto> ChangeMimeRange(ChangeMimeRangeParam request) { new ChangeMimeRangeParamValidator().Validate(request).Check(HttpStatus.Err.Name); List <ChangeMimeResultDto> ret = new List <ChangeMimeResultDto>(); request.Keys.Distinct().ToList() .ListPager( (list) => { ret.AddRange(ChangeMimeMulti(list.ToArray(), request.MimeType, request.PersistentOps)); }, 1000, 1); return(ret); }
/// <summary> /// 批量更改文件mime /// </summary> /// <param name="request"></param> /// <returns></returns> public List <ChangeMimeResultDto> ChangeMimeRange(ChangeMimeRangeParam request) { throw new NotImplementedException(); }