RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TAbstractWebRequestFile Class

TAbstractWebRequestFile describes an uploaded file from an HTTP request.

Pascal
TAbstractWebRequestFile = class(TObject);
C++
class TAbstractWebRequestFile : public TObject;

HTTPApp

TAbstractWebRequestFile introduces properties to describe and provide access to an uploaded file from an HTTP request. These include 

FileName, which gives the name of the uploaded file. 

FieldName, which gives the name of the field whose value is the uploaded file. 

ContentType, which describes how the file data is encoded. 

Stream, which is a stream object from which you can read the file content. 

The methods that implement these properties are all abstract or, in C++ terminology, pure virtual. This means that the Web server application does not instantiate TAbstractWebRequestFile. Instead, it uses a TAbstractWebRequestFile descendant such as TWebRequestFile (which is included in WebSnap). 

Each TAbstractWebRequestFile descendant describes a single uploaded file. A collection of all the uploaded files from the current request is available as the Files property of TWebRequest. In addition, in WebSnap applications, adapter fields that work with uploaded files surface those files using a TUpdateFileList object or IActionFieldValues interface.

Note: Support for uploaded files is only included in WebSnap. For other Web server applications, this class exists only as a placeholder for the Files property on TWebRequest.
 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!