Exemplo n.º 1
0
        public async Task <IActionResult> GetVehicleImageAsync(
            [FromHeader(Name = "x-api-key")] string apiKey,
            [FromRoute(Name = "plate")] string plate,
            [FromRoute(Name = "image")] string image,
            CancellationToken cancellationToken)
        {
            var vehicleImage = await _vehicleFacade.GetVehicleImageAsync(plate, image, cancellationToken);

            if (vehicleImage != null)
            {
                return(File(vehicleImage.Stream, vehicleImage.MimeType));
            }
            return(NoContent());
        }