/// <summary> /// 删除附件 /// </summary> /// <param name="key"></param> /// <returns></returns> public static MessageRecorder <bool> DeleteObject(string key) { if (string.IsNullOrEmpty(key)) { return(new MessageRecorder <bool>().SetValue(true)); } var service = new AliyunOssService(); return(service.DeleteObject(key)); }
/// <summary> /// 删除文件 /// </summary> /// <param name="keys"></param> /// <returns></returns> public static MessageRecorder <bool> Remove(IList <string> keys) { var mr = new MessageRecorder <bool>(); if (keys.IsNullOrEmpty()) { return(mr); } var service = new AliyunOssService(); foreach (var key in keys) { mr.Append(service.DeleteObject(key)); } return(mr); }