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. Image for the cookie policy date

File Size

Hi,
Is there a max file size that is allowed to be used when uploading a file?  I am trying to upload an excel file to a webserver but it fails.  If I remove enough data from the file to shrink the file size, the upload then works.
I don't believe it is a restriction from the webserver because I can ftp the full size file without a problem.

Also, is there a way to see why the upload fails?  All I get is a red x in the upload box but I have no idea as to why.

1 Reply

KV Karthikeyan Viswanathan Syncfusion Team March 23, 2017 10:58 AM UTC

Hi Richard,   
  
Thanks for contacting Syncfusion support.  
  
Query: “Is there a max file size that is allowed to be used when uploading a file?” 
 
Yes, In the UploadBox control, You can restrict the files from being browsed using the FileSize property. When you do not use this property, it takes a default size, 31457280B, that is, 31MB. When this size exceeds, we cannot browse the file. 
 
Please refer to the help Documentation link: https://help.syncfusion.com/aspnetmvc/uploadbox/file-size  
 
Query: “is there a way to see why the upload fails?” 
 Yes, you can find the error details in error event in uploadbox. 
 
Refer to the code snippet:  
  
<code>  
@Html.EJ().Uploadbox("UploadDefault").SaveUrl("SaveDefault").RemoveUrl("RemoveDefault").FileSize(100000000).ClientSideEvents(obj=>obj.Error("fileerror")) 
</code>  
<code>  
    <script type="text/javascript"> 
        function fileerror(args) { 
            alert(args.error); 
        } 
    </script></code>  
  
  
 
Regards,    
Karthikeyan V.  


Loader.
Live Chat Icon For mobile
Up arrow icon