Hello,
I am working on a kendo mobile app built with mvc and mvvm.
I have a form with some fields ( a model ) and an upload control which allows one or more files to be uploaded.
On form submit I go to a viewmodel method which validates the form and if everything is ok then it creates a json object and passes that to an mvc controler for final processing. At this stage I also need to attach the information of the uploaded files. For details sake this is an email form and I want the file uploaded to become an attachment.
I cannot add the uploaded file information on form submit. Is there an example which shows how this works ?
I've seen a number of ways but none dealing with this process.
I tried an async manner for the file upload unfortunately that does not work very well due to the fact that it triggers on upload. Of course this only sends back the uploaded file and then I am supposed to store it somewhere apparently. I don't like this approach mainly because at the upload stage I may not even have the other form information. I need this to work properly, together, so the form validates then takes the uploaded file information and posts everything to the controller in one go not in a separate way.
How can this be achieved ?
I am working on a kendo mobile app built with mvc and mvvm.
I have a form with some fields ( a model ) and an upload control which allows one or more files to be uploaded.
On form submit I go to a viewmodel method which validates the form and if everything is ok then it creates a json object and passes that to an mvc controler for final processing. At this stage I also need to attach the information of the uploaded files. For details sake this is an email form and I want the file uploaded to become an attachment.
I cannot add the uploaded file information on form submit. Is there an example which shows how this works ?
I've seen a number of ways but none dealing with this process.
I tried an async manner for the file upload unfortunately that does not work very well due to the fact that it triggers on upload. Of course this only sends back the uploaded file and then I am supposed to store it somewhere apparently. I don't like this approach mainly because at the upload stage I may not even have the other form information. I need this to work properly, together, so the form validates then takes the uploaded file information and posts everything to the controller in one go not in a separate way.
How can this be achieved ?