Esempio n. 1
0
        public IHttpActionResult DownLoadFile(string Id)
        {
            Guid ret = Guid.Empty;

            if (string.IsNullOrEmpty(Id) || !Guid.TryParse(Id, out ret))
            {
                throw new BizException("参数错误");
            }
            var finder = PreviewRelationOperator.Instance.GetModel(Id);

            if (finder == null)
            {
                throw new BizException("附件查找失败");
            }
            var attachment  = AttachmentOperator.Instance.GetModel(finder.BusinessID);
            var downloadUrl = FileUploadHelper.GetDownLoadUrl(finder.DocumentFileCode, finder.DocumentFileName, attachment.IsUseV1);

            return(Redirect(downloadUrl));
        }