AxiosFile Class
A file part for multipart bodies.
public sealed class AxiosFile
Inheritance System.Object → AxiosFile
Constructors
AxiosFile(byte[], string, string) Constructor
Creates a file part from bytes.
public AxiosFile(byte[] content, string fileName, string? contentType=null);
Parameters
content System.Byte[]
The file content.
fileName System.String
File name sent with the part.
contentType System.String
Media type of the part.
AxiosFile(Stream, string, string) Constructor
Creates a file part from a stream.
public AxiosFile(System.IO.Stream content, string fileName, string? contentType=null);
Parameters
content System.IO.Stream
The file content, read when the request is sent.
fileName System.String
File name sent with the part.
contentType System.String
Media type of the part.
Properties
AxiosFile.Content Property
The file content, a byte[] or a System.IO.Stream.
public object Content { get; }
Property Value
AxiosFile.ContentType Property
Media type of the part, when set.
public string? ContentType { get; }
Property Value
AxiosFile.FileName Property
File name sent with the multipart part.
public string FileName { get; }