Current filter:
                                You should refresh the page.
                                  • It seems like DevExtreme.Form is not able to send a FileUpload. Please find attached Edit.cshtml file.

                                    ‍In this way attachment is always null in the controller

                                    public IActionResult Edit(TicketViewModel ticketViewModel, IFormFile attachment)

                                    If I work with regular html forms, it works.

                                    I‍s it due to something I'm doing wrong?
                                    B‍est regards

                                • Lex (DevExpress Support) 11.27.2019

                                  Hi Alex,

                                  Please perform the following steps to narrow down the cause of the issue:

                                  1. Make sure that you received the file on the server side. For this, check the Request dictionary to make sure that you received the file on the server side.
                                  2. Make sure that you have the the "attachment" field in your model class on the server. This way you should be able to obtain the uploaded file using your model field.

                                  A simple approach is demonstrated in our Server-Side Implementation in ASP.NET help section.

                                  If these steps don't help, please create a small runnable sample project to show me the issue and your implementation, so I can analyze and debug it on my side. I'll do my best to find a precise solution for you.

                                • Alex Jimenez 11.28.2019

                                  Hi Lex,

                                  N‍o way, if I use the Html.DevExtreme().Form<>() extension, there is no way to get the attachment in the server. Finally I've moved to a standar HTML form and it has worked.
                                  I think it's no such a big deal for you to provide to us a simple runable demo proving that it works rather to build a project to prove that it doesn't.

                                  I think it should be a basic demo tools from your side rather to redirecting us to the API information
                                  Best regards

                                1 Solution

                                Creation Date Importance Sort by

                                Hello Alex,
                                Please accept my apologies for not getting back to your earlier.
                                Our form widget doesn't replace the HTML form - you will need to wrap our form with the default one to utilize the submit functionality:

                                <form method="post" enctype="multipart/form-data">
                                    @using (Html.BeginForm()) {

                                I've prepared a simple project demonstrating how to receive files on the server side. Note that I changed the attachment's variable type to IFormFileCollection.
                                We usually prepare examples to either demonstrate solutions or give a basic sample that is easy to modify for our customers to illustrate their scenarios and issues. Thus, if my sample doesn't help you to get files on the server side in your project, modify my sample to illustrate the issue.

                                I think it should be a basic demo tools from your side

                                Do you mean demo samples? We provide demos in our Widget Gallery, which demonstrates implementation of basic tasks with our widgets.

                                I look forward to your reply.

                                • Alex Jimenez 12.03.2019

                                  Great Andrew !!
                                  T‍hanks so much for the example. It works great

                                  B‍est regards

                                • Andrew Ser (DevExpress Support) 12.03.2019

                                  You are welcome, Alex! I'm happy to hear that my assistance was helpful to you.
                                  Feel free to contact us any time if you have any questions.