Table of Contents

Class SunamoHttpPostedFile

Namespace
SunamoData.Data
Assembly
SunamoData.dll

Represents an HTTP posted file with its content and metadata.

public class SunamoHttpPostedFile
Inheritance
SunamoHttpPostedFile
Inherited Members
Extension Methods

Constructors

SunamoHttpPostedFile()

Initializes a new instance of the SunamoHttpPostedFile class.

public SunamoHttpPostedFile()

SunamoHttpPostedFile(long, string, string, List<byte>)

Initializes a new instance of the SunamoHttpPostedFile class with byte data.

public SunamoHttpPostedFile(long contentLength, string contentType, string fileName, List<byte> bytes)

Parameters

contentLength long

The length of the content in bytes.

contentType string

The MIME content type of the file.

fileName string

The name of the file.

bytes List<byte>

The byte data of the file.

SunamoHttpPostedFile(long, string, string, Stream)

Initializes a new instance of the SunamoHttpPostedFile class with a stream.

public SunamoHttpPostedFile(long contentLength, string contentType, string fileName, Stream inputStream)

Parameters

contentLength long

The length of the content in bytes.

contentType string

The MIME content type of the file.

fileName string

The name of the file.

inputStream Stream

The input stream containing the file data.

Properties

Bytes

Gets or sets the byte data of the file.

public List<byte> Bytes { get; set; }

Property Value

List<byte>

ContentLength

Gets or sets the length of the content in bytes.

public long ContentLength { get; set; }

Property Value

long

ContentType

Gets or sets the MIME content type of the file.

public string ContentType { get; set; }

Property Value

string

FileName

Gets or sets the name of the file.

public string FileName { get; set; }

Property Value

string

Methods

SaveAs(string)

Saves the file to the specified filename asynchronously.

public Task SaveAs(string filename)

Parameters

filename string

The path where the file should be saved.

Returns

Task