示例#1
0
        public StreamActionResult GetFile(string fileName, string id, string scope)
        {
            var url = GetUrl(
                Action.get,
                fileName,
                id,
                scope);
            var response = SendHttpRequest(url);

            var result = new StreamActionResult(CheckResponseStatusCode(response));

            if (result.Status == ActionStatus.Error)
            {
                return(result);
            }

            result.Size  = response.ContentLength;
            result.Value = response.GetResponseStream();
            return(result);
        }
示例#2
0
        public StreamActionResult GetFile(string fileName, string id, string scope)
        {
            var url = GetUrl(
                Action.get,
                fileName,
                id,
                scope);
            var response = SendHttpRequest(url);

            var result = new StreamActionResult(CheckResponseStatusCode(response));
            if (result.Status == ActionStatus.Error)
                return result;

            result.Size = response.ContentLength;
            result.Value = response.GetResponseStream();
            return result;
        }