How do I create a proper File Uploader in an MVC application to work with Kentico Forms and the Biz

Landon Hulcy asked on April 13, 2021 18:08

I am trying to build out a proper File Uploader control on my MVC project that will properly attach the file to a Kentico Form submission as well as attach the file to the submission email. I have looked through all of the documentation I can find on this and I do not see anywhere that has this documented.

Are there any resources on exactly how to do this? I built out the form with a file uploader field but in the MVC code that field is seen as a string.

Environment is currently running Kentico v12.0.54

Recent Answers

Dmitry Bastron answered on April 19, 2021 11:22

Hi Landon,

I think if you really need this to be a custom component and you can't just use the out-of-the-box one the best way to go would be to reverse-engineer Kentico component. You can decompile Kentico.Content.Web.Mvc.dll and check what's under the bonnet of FileUploaderComponent.

0 votesVote for this answer Mark as a Correct answer

Landon Hulcy answered on April 19, 2021 15:53

Dmitry, thank you for the response.

If there is a way to use an out-of-the-box file uploader component inside of a form in an MVC environment, I would prefer to do that. But I do not see any documentation on how to build out the view and controller in an MVC project for this.

Would you please direct me to that documentation if there is any?

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.