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

How to retrieve the selected file details from "FileSelect" event arguments in UploadBox?

Platform: ASP.NET MVC |
Control: Uploadbox |
Published Date: July 7, 2015 |
Last Revised Date: August 19, 2015

The FileSelect event is triggered when the file is selected for upload successfully. In that event argument, you can get the selected file details of the UploadBox control. You have to declare the FileSelect event of the UploadBox as illustrated in the following code example.

CSHTML

 

 JavaScript

 

From the above code arg [0], you can get the following file details.

Name

Type

Description

argument

Object

Event parameters in arg[0]

  1. extension - File Extension
  2. name - File Name
  3. rawFile - Raw File details
  4. size - File Size

 

Other parameters in the argument:

Name

Type

Description

cancel

 

 

 

Boolean

 

 

Set cancel as true for the event to be cancelled, otherwise set as false.

model

 

 

 

object

 

Returns the UploadBox model

type

 

string

 

Returns the name of the event.

 

 

ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

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