System.Net.Mime.TMultipartFormData.AddStream
Delphi
procedure AddStream(const AField: string; AStream: TStream; AOwnsStream: Boolean;
const AFileName: string = ''; const AContentType: string = '';
AHeaders: TStrings = nil); overload;
procedure AddStream(const AField: string; AStream: TStream;
const AFileName: string = ''; const AContentType: string = '';
AHeaders: TStrings = nil); overload; deprecated 'Use AddStream with AOwnsStream parameter';
C++
void __fastcall AddStream(const System::UnicodeString AField, System::Classes::TStream* AStream, bool AOwnsStream, const System::UnicodeString AFileName = System::UnicodeString(), const System::UnicodeString AContentType = System::UnicodeString(), System::Classes::TStrings* AHeaders = (System::Classes::TStrings*)(0x0))/* overload */;
void __fastcall AddStream _DEPRECATED_ATTRIBUTE1("Use AddStream with AOwnsStream parameter") (const System::UnicodeString AField, System::Classes::TStream* AStream, const System::UnicodeString AFileName = System::UnicodeString(), const System::UnicodeString AContentType = System::UnicodeString(), System::Classes::TStrings* AHeaders = (System::Classes::TStrings*)(0x0))/* overload */;
Properties
| Type | Visibility | Source | Unit | Parent |
|---|---|---|---|---|
procedure function |
public | System.Net.Mime.pas System.Net.Mime.hpp |
System.Net.Mime | TMultipartFormData |
Description
Adds a form data stream.
AddStream has the following parameters:
AField: A string that specifies the field name.AStream: The content of the stream that represents the value of the field.AOwnsStream: Set itTrueto let TMultipartFormData manage the stream and release it when it is not needed anymore. WhenFalse, the application must release the stream.AFileName: Optional filename attribute value of field.AContentType: Optional Content-Type attribute value of field. If not specified, application/octet-stream will be used.AHeaders: Optional parameter that allows specifying additional headers for a section of multipart/form-data content. Default value isNil.