Click or drag to resize
UploadedFile Class

Provides a way to access individual files that have been uploaded by a client via a KaxUpload control.

Inheritance Hierarchy
SystemObject
  Kettic.AspNet.ControlsUploadedFile

Namespace: Kettic.AspNet.Controls
Assembly: Kettic.AspNet.Controls (in Kettic.AspNet.Controls.dll) Version: 2014.4.1129.0 (2014.04.1129.0)
Syntax
public abstract class UploadedFile

The UploadedFile type exposes the following members.

Methods
  NameDescription
Public methodStatic memberFromHttpPostedFile(HttpPostedFile)
Creates a UploadedFile instance from HttpPostedFile instance.
Public methodStatic memberFromHttpPostedFile(String, HttpPostedFile)
Creates a UploadedFile instance from HttpPostedFile instance.
Public methodGetExtension
Returns the extension of the file on the client's computer.
Public methodGetFieldValue
Returns the value of a custom field.
Public methodGetIsFieldChecked
Returns the checked state of a custom field.
Public methodGetName
Returns the name and extension of the file on the client's computer.
Public methodGetNameWithoutExtension
Returns the name of the file on the client's computer without the extension.
Public methodCode exampleSaveAs(String)
Saves the contents of an uploaded file.
Public methodCode exampleSaveAs(String, Boolean)
Saves the contents of an uploaded file.
Top
Properties
  NameDescription
Public propertyCode exampleContentLength
Gets the size in bytes of an uploaded file.
Public propertyCode exampleContentType
Gets the MIME content type of a file sent by a client.
Public propertyCode exampleFileName
Gets the fully-qualified name of the file on the client's computer (for example "C:\MyFiles\Test.txt").
Public propertyInputStream
Gets a Stream object which points to the uploaded file to prepare for reading the contents of the file.
Top
Remarks

The UploadedFileCollection class provides access to all files uploaded from a client via single KaxUpload instance as a file collection. UploadedFile provides properties and methods to get information on an individual file and to read and save the file. Files are uploaded in MIME multipart/form-data format and are NOT buffered in the server memory if the KaxUploadModule is used.

The KaxUpload control must be used to select and upload files from a client.

You can specify the maximum allowable upload file size in a machine.config or Web.config configuration file in the maxRequestLength attribute of the <httpRuntime> Element element.

Examples
Set the maximum allowable upload file size to 1000kB
<httpRuntime maxRequestLength="1000" />
See Also