public Attachment(IAttachmentHandler handler, string url, ContentItem enclosingItem, byte[] fileContents) { this.handler = handler; this.url = url; this.enclosingItem = enclosingItem; this.fileContents = fileContents; }
public Attachment(IAttachmentHandler handler, string url, ContentItem enclosingItem, byte[] fileContents) { _handler = handler; _url = url; _enclosingItem = enclosingItem; _fileContents = fileContents; }
/// <summary> /// 下载文件 /// </summary> /// <param name="filePath"></param> /// <param name="fileName"></param> /// <returns></returns> public ActionResult DownFile(string filePath, string fileName) { IAttachmentHandler handler = GetAttachmentHandler(); handler.DownFile(filePath, fileName, Response, Server); return(new EmptyResult()); }
public ActionResult Upload() { IAttachmentHandler handler = GetAttachmentHandler(); handler.BreakPointTransmission(Request); return(Json(new { status = true })); }
public RouteController ( IHostingEnvironment environment, IUserService userService, IAttachmentHandler attachmentHandler, IRouteService routeService ) { _environment = environment; _userService = userService; _attachmentHandler = attachmentHandler; _routeService = routeService; }
/// <summary> /// 合并文件分片 /// </summary> /// <returns></returns> public ActionResult Merge() { try { IAttachmentHandler handler = GetAttachmentHandler(); var AttachModel = handler.SaveAttach(Request, Server); return(Json(new { status = true, filepath = AttachModel.Path, filename = AttachModel.AttachmentName, objecttype = AttachModel.ObjectType, Id = AttachModel.AttachmentID, }));//随便返回个值,实际中根据需要返回 } catch (Exception ex) { throw new Exception(ex.Message); } }
public int CompareTo(IAttachmentHandler other) { return Name.CompareTo(other.Name); }
public int CompareTo(IAttachmentHandler other) { return(Name.CompareTo(other.Name)); }
public AttachmentController(IAttachmentHandler attachmentHandler) { _attachmentHandler = attachmentHandler; }