Пример #1
0
 public Attachment(IAttachmentHandler handler, string url, ContentItem enclosingItem, byte[] fileContents)
 {
     this.handler       = handler;
     this.url           = url;
     this.enclosingItem = enclosingItem;
     this.fileContents  = fileContents;
 }
Пример #2
0
		public Attachment(IAttachmentHandler handler, string url, ContentItem enclosingItem, byte[] fileContents)
		{
			_handler = handler;
			_url = url;
			_enclosingItem = enclosingItem;
			_fileContents = fileContents;
		}
Пример #3
0
 public Attachment(IAttachmentHandler handler, string url, ContentItem enclosingItem, byte[] fileContents)
 {
     this.handler = handler;
     this.url = url;
     this.enclosingItem = enclosingItem;
     this.fileContents = fileContents;
 }
Пример #4
0
        /// <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());
        }
Пример #5
0
        public ActionResult Upload()
        {
            IAttachmentHandler handler = GetAttachmentHandler();

            handler.BreakPointTransmission(Request);
            return(Json(new { status = true }));
        }
Пример #6
0
 public Attachment(IAttachmentHandler handler, string url, ContentItem enclosingItem, byte[] fileContents)
 {
     _handler       = handler;
     _url           = url;
     _enclosingItem = enclosingItem;
     _fileContents  = fileContents;
 }
Пример #7
0
 public RouteController
 (
     IHostingEnvironment environment,
     IUserService userService,
     IAttachmentHandler attachmentHandler,
     IRouteService routeService
 )
 {
     _environment       = environment;
     _userService       = userService;
     _attachmentHandler = attachmentHandler;
     _routeService      = routeService;
 }
Пример #8
0
 /// <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);
 }
Пример #10
0
 public int CompareTo(IAttachmentHandler other)
 {
     return(Name.CompareTo(other.Name));
 }
Пример #11
0
 public AttachmentController(IAttachmentHandler attachmentHandler)
 {
     _attachmentHandler = attachmentHandler;
 }