Ejemplo n.º 1
0
        public IActionResult Upload(UploadForm form)
        {
            if (form.File is null)
            {
                return(RedirectToAction("Upload", new { id = form.Id }));
            }
            ;
            Speaker speaker = _speakerService.GetById(form.Id);

            byte[] audioFile = GetByteArray(form.File);

            _speechService.AddAudio(form.File.FileName, audioFile, speaker);

            return(RedirectToAction("View", "Speaker", new { Id = form.Id }));
        }