Web.HTTPApp.TAbstractWebRequestFile

From RAD Studio API Documentation
Jump to: navigation, search

System.TObjectTAbstractWebRequestFile

Delphi

TAbstractWebRequestFile = class(TObject)

C++

class PASCALIMPLEMENTATION TAbstractWebRequestFile : public System::TObject

Properties

Type Visibility Source Unit Parent
class public
Web.HTTPApp.pas
Web.HTTPApp.hpp
Web.HTTPApp Web.HTTPApp

Description

TAbstractWebRequestFile describes an uploaded file from an HTTP request.

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 Web Broker).

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 Web Broker 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 Web Broker. For other Web server applications, this class exists only as a placeholder for the Files property on TWebRequest.

See Also