public ActionResult Upload(Guid inspectionItemId, IFormFile image)
        {
            var inspectionItemInDb = _context.InspectionItems
                                     .Include(ii => ii.Inspection)
                                     .SingleOrDefault(item => item.Id == inspectionItemId);

            if (inspectionItemInDb == null)
            {
                return(NotFound());
            }

            var workOrderId = inspectionItemInDb.Inspection.WorkOrderId;

            // New guid is used as a random prefix to the filename to ensure uniqueness
            Image imageDto = ImageService.SaveImage(image, new[] { ImageDirectory, workOrderId, inspectionItemId.ToString() }, Guid.NewGuid().ToString(), false);

            return(InspectionService.AddInspectionItemImage(_context, inspectionItemInDb, imageDto) ?
                   NoContent() :
                   StatusCode(500));
        }