Click or drag to resize
IUploadedFile Interface
Describes implementation that contain methods to access the content of uploaded file.

Namespace: CMS.Base
Assembly: CMS.Base (in CMS.Base.dll) Version: 13.0.131
Syntax
C#
public interface IUploadedFile

The IUploadedFile type exposes the following members.

Properties
  NameDescription
Public propertyCanOpenReadStream
Gets a value that indicates whether the IUploadedFile implementation supports accessing the input stream via OpenReadStream method.
Public propertyContentType
Gets the MIME content type of an uploaded file.
Public propertyFileName
Gets the fully qualified name of the file on the client.
Public propertyInputStream
Gets a Stream object that points to an uploaded file. This property will return the same object when it is accessed multiple times.
Public propertyLength
Gets the size of an uploaded file in bytes.
Top
Methods
  NameDescription
Public methodOpenReadStream
Opens the request stream for reading the uploaded file. Once the read is completed this stream should be disposed manually.
Top
Extension Methods
  NameDescription
Public Extension MethodGetBytes

Gets the content of uploaded file as byte array with array length equal to Length.

When the CanOpenReadStream is then the input stream will be accessed via OpenReadStream method and then disposed.

When the CanOpenReadStream is then the input stream will be accessed via InputStream method, attempted to seek to the beginning and then read.

(Defined by UploadedFileExtensions.)
Top
See Also