We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Attaching the files to the view model of the over all page instead of uploading within the Upload control?

Thread ID:

Created:

Updated:

Platform:

Replies:

146144 Jul 22,2019 08:30 PM UTC Jul 30,2019 11:34 AM UTC ASP.NET MVC - EJ 2 3
loading
Tags: Uploader
John Stemper
Asked On July 22, 2019 08:30 PM UTC

I want to keep the uploaded files together with the rest of the view model when the page is submitted so that the uploaded files can be saved to the appropriate location after the rest of the page data has been inserted into a DB.

How can I post the uploads with the rest of the page and not as a separate upload?

Narayanasamy Panneer Selvam [Syncfusion]
Replied On July 24, 2019 02:24 PM UTC

Hi John, 
Thanks for contacting Syncfusion support. 
We have validated your query, please find details in below.

 
Query: How can post the uploads with the rest of the page and not as a separate upload? 
 
You can get it done by using form upload option in our EJ2 Uploader. To enable this function, please Set autoUpload API value as false
Don’t set save and removeUrl values in asyncSettings API. 
EJ2 Uploader with the above mentioned configuration, file will be posted in form submit only. 
For your reference we have prepared a sample. Please find it in the below link. 
  
To know more details about form support, please refer below documentation link. 
 
Regards,  
Narayanasamy P.  


John Stemper
Replied On July 26, 2019 06:56 PM UTC

Using the sample solution you referred me to returns a file with no name or content. That is as-is without any changes to the source.

Narayanasamy Panneer Selvam [Syncfusion]
Replied On July 30, 2019 11:34 AM UTC

Hi John, 

Thanks for your update.
 
 
We have validated your problem in the reported scenario. We could able to get the postedFile and filename in controller. Please find the screenshot below, 
 
 
 
However, if want to redirect into view when you click the submit, you can redirect from the controller by using the below code, 
return Redirect("/Home/Index"); 
Please revert to us if we misunderstood your requirement. If yes, kindly share more details about your issue. So that we can quickly provide prompt solution at our end. 
 
 
Regards, 
Narayanasamy P. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon