예제 #1
0
        public async Task <IHttpActionResult> UploadDoc(int goodId)
        {
            return(await ExecuteValidatedActionAsync(async() =>
            {
                var doc = await _docReader.GetDocBytesFromRequest(this);
                var uploadedBy = this.GetUserId();
                var docRec = _service.CreateDocument(goodId, doc.FileName, doc.DocBytes, uploadedBy);

                return Ok(docRec);
            }));
        }