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

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