ASP.NET 3.5 and above only

Obout.Ajax.UI Controls - File Upload - Client side

Obout.Ajax.UI.FileUpload.FileUpload class

 Inheritance Hierarchy

It is a client-side representation of the server-side Obout.Ajax.UI.FileUpload.FileUpload class.
Note Note
To get or set property values for client API properties, you must call property accessor methods that are named with the get_ and set_ prefixes. For example, to get or set a value for a property such as validFileExtensions, you call the get_validFileExtensions or set_validFileExtensions methods:
var uploaderObject = $find("<%= uploader1.ClientID %>");
var _validFileExtensions = uploaderObject.get_validFileExtensions();
...
uploaderObject.set_validFileExtensions("gif;jpeg;jpg");

Properties

Name Description
propertyclearFilesList string. Gets or sets the localized text for title of 'Clear files list' button.
propertydelayOnError number. Gets or sets the delay in seconds before postback after server response with error.
propertyelement node. Gets the DOM element that the current control object is associated with. (Inherited from Sys.UI.Control.)
propertyfilesSelected boolean. Gets a value indicating whether files were selected for upload.
propertyinfoImage string. Gets the URL of image used for 'info' button.
propertyinProgressImage string. Gets the URL of the 'In Progress' image used for a file that is still uploading (in list of files).
propertyinvalidFileSizeMessage string. Gets or sets a formatting string for the message when a file with too large content was selected.

By default a value of the FileUpload.InvalidFileSize field is taken from the localization RESX file.
If the localization file is not found than the following value is used:
"Invalid file (%n) size: %c\nMaximum size: %m"

In this formatting string:
%n is replaced with the filename;
%c is replaced with the size of this file;
%m is replaced with the maximum size of the file for uploading.
propertyinvalidTotalSizeMessage string. Gets or sets a formatting string for the message when files with too large total content were selected.

By default a value of the FileUpload.InvalidTotalSize field is taken from the localization RESX file.
If the localization file is not found than the following value is used:
"Too large total size: %c\nMaximum size: %m"

In this formatting string:
%c is replaced with the total size of the selected files;
%m is replaced with the maximum total size.
propertyisFinished boolean. Gets a value indicating whether the uplading is complete.
propertyisInProgress boolean. Gets a value indicating whether the uplading is in progress.
propertylistTextFormate string. Gets or sets the format string for the information textbox when more than one file selected.
propertymaximumFileSize number. Gets or sets the maximum size (in kB) of the file for uploading.
Default 0 - any size is allowed.
propertymaximumTotalFileSize number. Gets or sets the maximum total size (in kB) of files for uploading.
Default 0 - any size is allowed.
propertyoneFileSelected string. Gets or sets the format string for the information textbox when more one file selected.
propertyprogressbar object. Gets the internal ProgressBar component.
propertyserverFinishedMessage string. Gets or sets the message in progress bar after server response.
propertyserverProcessingMessage string. Gets or sets the message in progress bar after file(s) transfered but before server response.
propertyspeed string. Gets or sets the localized text for 'Current speed'.
propertyspeedFormat string. Gets or sets the format string for upload speed value.
propertystopUploadImage string. Gets the URL of image used for 'clear files list' button.
propertytimeElapsed string. Gets or sets the localized text for 'Elapsed time'.
propertytimeEstimated string. Gets or sets the localized text for 'Estimated time'.
propertytimeFormat string. Gets or sets the format string for time value.
propertyuploadFinishedImage string. Gets the URL of image indicating that file is uploaded already (in list of files).
propertyvalidFileExtensions string. Gets or sets valid extensions of files (separated with ';').
Default empty string (all files are allowed).

Public methods

Name Description
methodgetFormattedBytes(size) string. Returns the size formatted with the speedFormat property.
methodgetFormattedTime(time) string. Returns the time formatted with the timeFormat property.

Static methods

Name Description
methodObout.Ajax.UI.FileUpload.FormatBytes(size) string. Returns the size in human readable form.
Note Note
To add or remove handler functions for client API events, you must call methods that are named with the add_ and remove_ prefixes. For example, to add or remove a handler function for an event such as filesPicked, you call the add_filesPicked or remove_filesPicked methods:
function filesPickedHandler(sender, args) {
  if (args.get_files().length > 5) {
      alert("Too many files selected: " + args.get_files().length);
      args.set_cancel(true);
  }
}
...
var uploaderObject = $find("<%= uploader1.ClientID %>");
uploaderObject.add_filesPicked(filesPickedHandler);
...
uploaderObject.remove_filesPicked(filesPickedHandler);

Events

Name Description
propertybeforeUpload Raised just before files transfer started.
Event's argument has type Obout.Ajax.UI.FileUpload.FilesUploadArgs.
propertyfilesPicked Raised when files where selected from the files browser.
Event's argument has type Obout.Ajax.UI.FileUpload.FilesUploadArgs.
propertyafterServerResponse Raised when the server acknowledges receipt of all files.
Event's argument has type Obout.Ajax.UI.FileUpload.FilesUploadArgs.
propertytransferFinished Raised when all files have been transfered.
Event's argument has type Obout.Ajax.UI.FileUpload.FilesUploadArgs.

"Thanks so much, you guys have the best support I have ever seen."

Mike Blandford

Random testimonial   All testimonials