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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Synchronous upload: file doesn't save when close popup

Thread ID:

Created:

Updated:

Platform:

Replies:

128064 Dec 29,2016 12:08 PM UTC Jan 4,2017 04:39 AM UTC ASP.NET MVC 3
loading
Tags: Uploadbox
John
Asked On December 29, 2016 12:08 PM UTC

Hello everybody!

1) I am using Synchronous upload, but when I close upload popup window and click submit, in controllers ActionResult i have file argument as a null.
But if I click to submit without closing upload popup window everything is ok.

2) After closing popup window I want to show user his queque of upload files with an opportunity of delete (you have realized this in MVC classic demos)

Karthikeyan Viswanathan [Syncfusion]
Replied On January 2, 2017 12:34 PM UTC

Hi John, 
  
Thanks for contacting Syncfusion Support. 
 
Please find the details: 
 
Query 
Response 
I am using Synchronous upload, but when I close upload popup window and click submit, in controllers ActionResult i have file argument as a null. 
But if I click to submit without closing upload popup window everything is ok. 
 
While close the upload popup window , We have remove and refresh the selected files. So, Argument throws a null value.  
 
You want to hide the upload popup window means, you can set ShowFileDetails(false). 
 
Find the code snippet: 
<code> 
 
                    @{Html.EJ().Uploadbox("UploadDefault").SaveUrl("SaveDefault").RemoveUrl("RemoveDefault").AsyncUpload(false).ShowFileDetails(false).Render();} 
 
</code> 
 
After closing popup window I want to show user his queque of upload files with an opportunity of delete (you have realized this in MVC classic demos) 
You can show the selected files using FileSelect event. You can get the selected files in an argument. Please find the below code snippet: 
<code> 
 
@{Html.EJ().Uploadbox("UploadDefault").SaveUrl("SaveDefault").RemoveUrl("RemoveDefault").AsyncUpload(false).ShowFileDetails(false).ClientSideEvents(obj => obj.FileSelect("begin")).Render();} 
                
 
function begin(args) { 
        for (var i = 0; i < args.files.length;i++) 
            $("<li class='e-upload-file'></li>").append("<div class='e-file-list'><div class='e-file-progress e-file-view'><div class='e-file-name e-file-view'><span class='e-file-name-txt'>" + args.files[i].name + "</span></div></div><div class='e-file-size e-file-view'><span class='e-file-name-txt'>" + args.files[i].size + "</span></div><div class='e-file-percentage e-file-view'><div class='e-file-progress-bar'><div class='e-file-progress-status'></div></div></div><div class='e-action-perform'><div class='e-icon e-file-cancel' data-content='Cancel'></div></div></div>").appendTo("ul.upload.e-ul"); 
    } 
 
</code> 
 
In general, Synchronous upload files can’t remove at particular. We have no option for remove the particular item in Synchronous upload files. You can only remove the whole files.  
 
 
Regards, 
Karthikeyan V. 


John
Replied On January 3, 2017 07:16 AM UTC

Thank YOU!

Karthikeyan Viswanathan [Syncfusion]
Replied On January 4, 2017 04:39 AM UTC

Hi John,  
 
Thanks for the update.  
 
We are glad the suggestion helped you to achieve your requirement.  
Please let us know if you need further assistance.  
 
Regards,   
Karthikeyan V. 


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.

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

;