class InterviewApplicationSendInviteController {

    @PostMapping(value = "/send", params = {"attachFeedbackApplicationId"})
    public String uploadFeedback(Model model,
                              @PathVariable("competitionId") long competitionId,
                              @ModelAttribute("form") InterviewApplicationSendForm form,
                              BindingResult bindingResult,
                              ValidationHandler validationHandler) {

        Supplier<String> failureAndSuccesView = () ->
                getInvitesToSend(model, competitionId, form.getPage(), form, bindingResult);

        MultipartFile file = form.getNotEmptyFile();
        int index = form.getFeedback().indexOf(file);
        return validationHandler.performFileUpload(String.format("feedback[%s]", index), failureAndSuccesView, () -> interviewAssignmentRestService
                .uploadFeedback(form.getAttachFeedbackApplicationId(), file.getContentType(), file.getSize(), file.getOriginalFilename(), getMultipartFileBytes(file)));
    }

    @Autowired public  InterviewApplicationSendInviteController(InterviewApplicationsSendModelPopulator interviewApplicationsSendModelPopulator,
                                                    InterviewApplicationSentInviteModelPopulator interviewApplicationSentInviteModelPopulator,
                                                    InterviewAssignmentRestService interviewAssignmentRestService);

}