Web.ReqFiles.TWebRequestFiles.Add
Delphi
procedure Add(const AName, AFileName, AContentType: string; AContent: Pointer; AContentLength: Integer); overload;
procedure Add(AFile: TWebRequestFile); overload;
C++
void __fastcall Add(const System::UnicodeString AName, const System::UnicodeString AFileName, const System::UnicodeString AContentType, void * AContent, int AContentLength)/* overload */;
void __fastcall Add(TWebRequestFile* AFile)/* overload */;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | Web.ReqFiles.pas Web.ReqFiles.hpp |
Web.ReqFiles | TWebRequestFiles |
Description
Adds a new Web request file object to the collection.
Call Add to add a TWebRequestFile object to the collection. Add inserts the new Web request file object at the end of the Items property array and increments the value of the Count property.
Use the first syntax to cause TWebRequestFiles to create the Web request file object you are adding. Use the second syntax to add an existing TWebRequestFile object. Using either syntax, TWebRequestFiles assumes ownership of the new Web request file object and is responsible for freeing it.
AName is the name of the adapter field whose value the new file represents. It becomes the value of the FieldName property of the new TWebRequestFile object.
AFileName is the name of the file to add. It becomes the value of the FileName property of the new TWebRequestFile object.
AContentType describes how the file content is encoded. It becomes the value of the ContentType property of the new TWebRequestFile object.
AContent is an array of bytes that is the content of the file. It is used to initialize the Stream property of the new TWebRequestFile object.
AContentLength is the number of bytes in AContent.
AFile is an existing TWebRequestFile object that describes the file you are adding.