public async Task UploadImage()
        {
            var    modelId  = Request.Form["modelId"];
            string fileName = Request.Form["fileName"];
            var    model    = Request.Form["model"];

            string pathToFolder = Path.Combine(Directory.GetCurrentDirectory(),
                                               "clientapp", configuration["RootFolder"], "images", model, modelId);

            await Image.UploadImage(Request.Form.Files[0], pathToFolder, fileName);

            int numberId;

            if (int.TryParse(modelId, out numberId))
            {
                imageRepository.AddImageToModel(numberId, fileName + Path.GetExtension(Request.Form.Files[0].FileName),
                                                model, userManager.GetUserId(HttpContext.User));
            }
        }