示例#1
0
        public async Task Signature(String Base, String id, HttpResponseBase Response, Action <ExpandoObject> setParams)
        {
            try
            {
                var url = $"/_attachment{Base}/{id}";
                var si  = await _baseController.DownloadSignature(url, setParams);

                if (si == null)
                {
                    throw new RequestModelException($"Signature not found. (Id:{id})");
                }

                Response.ContentType = "application/octet-stream";
                Response.BinaryWrite(si.Stream);
            }
            catch (Exception ex)
            {
                _baseController.WriteExceptionStatus(ex, Response);
            }
        }