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.
Unfortunately, activation email could not send to your email. Please try again.

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

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.

 

 

Article ID: Published Date: Last Revised Date: Platform: Control:
5186 07/07/2015 08/19/2015 ASP.NET MVC Uploadbox
Did you find this information helpful?
Add Comment
You must log in to leave a comment

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.