public JsonResult Update(FileJsonRequestModel fileJson)
        {
            var updatingFile = new File
            {
                Id          = fileJson.Id,
                Name        = fileJson.File?.FileName,
                Size        = fileJson.File?.ContentLength ?? 0,
                Description = fileJson.Description.TrimAndUppercaseFirst(),
                FileData    = new FileData
                {
                    Id   = fileJson.Id,
                    Data = fileJson.GetFileData()
                }
            };

            var updatedFile = _fileProvider.UpdateFile(updatingFile);

            var updatedFileJsonModel = new FileJsonResponseModel
            {
                Id          = updatedFile.Id,
                Name        = updatedFile.Name,
                Description = updatedFile.Description,
                Size        = updatedFile.Size
            };

            return(Json(updatedFileJsonModel));
        }
        public JsonResult Add(FileJsonRequestModel fileJson)
        {
            var uploadingFile = new File
            {
                TraineeProfileId = fileJson.ProfileId,
                Name             = fileJson.File?.FileName,
                Size             = fileJson.File?.ContentLength ?? 0,
                Description      = fileJson.Description.TrimAndUppercaseFirst(),
                FileData         = new FileData
                {
                    Id   = fileJson.Id,
                    Data = fileJson.GetFileData()
                }
            };

            var addedFile          = _fileProvider.AddFile(uploadingFile);
            var addedFileJsonModel = new FileJsonResponseModel
            {
                Id          = addedFile.Id,
                Name        = addedFile.Name,
                Description = addedFile.Description,
                Size        = addedFile.Size
            };

            return(Json(addedFileJsonModel));
        }