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
contentLengthlongThe length of the content in bytes.
contentTypestringThe MIME content type of the file.
fileNamestringThe name of the file.
bytesList<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
contentLengthlongThe length of the content in bytes.
contentTypestringThe MIME content type of the file.
fileNamestringThe name of the file.
inputStreamStreamThe 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
ContentLength
Gets or sets the length of the content in bytes.
public long ContentLength { get; set; }
Property Value
ContentType
Gets or sets the MIME content type of the file.
public string ContentType { get; set; }
Property Value
FileName
Gets or sets the name of the file.
public string FileName { get; set; }
Property Value
Methods
SaveAs(string)
Saves the file to the specified filename asynchronously.
public Task SaveAs(string filename)
Parameters
filenamestringThe path where the file should be saved.