public async Task <IActionResult> RunAsync(
            [HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = null)]
            HttpRequest req,
            ILogger logger)
        {
            try
            {
                PackagingSlip model = null;

                var tempFilePath = _svcRequest.CreateTempFile(req.Body);

                using (FileStream fStream = new FileStream(tempFilePath, FileMode.Open))
                {
                    var fileMimeType  = _svcRequest.GetMimeTypeFromFilePath(tempFilePath);
                    var analyzeResult = await _svcAnalisys.AnalyzeAsync(fileMimeType, fStream);

                    if (analyzeResult != null)
                    {
                        model = _svcResponse.Parse(analyzeResult);
                        model.LocationMatchs = _svcResponse.ChecksLocation(_svcRequest.Request.CurrentLocation);
                    }
                }

                _svcRequest.DeleteTempFile(tempFilePath);

                return(HttpStatusCode.OK == ChecksResult(model, logger, out string jsonResponse)
                      ? (ActionResult) new OkObjectResult(jsonResponse)
                      : new BadRequestObjectResult(jsonResponse));
            }
            catch (Exception ex)
            {
                var error = $"Unexpected exception scanning image. ex:{ex.ToString()}";
                logger.LogError(error);
                var response = new Response <string>()
                {
                    StatusCode = (int)HttpStatusCode.BadRequest,
                    Data       = error
                };

                return(new BadRequestObjectResult(JsonConvert.SerializeObject(response)));
            }
        }