Unit

ScHttpMultipartData

 

Description

TScHttpMultipartData is a class that provides structured storage for data saved to a stream in the multipart/form-data format, as defined in RFC 7578. For example, the following data:

 

--AaB03x

content-disposition: form-data; name="field1"; filename="TestFile.txt"

content-type: text/plain

content-transfer-encoding: Binary

 

This is content from the text file.

 

--AaB03x

 

is represented by a TScHttpMultipartData object with the following property values:

 

ContentName = 'field1'

ContentType = 'text/plain'

ContentTransferEncoding = 'Binary'

FileName = 'TestFile.txt'

 

TScHttpMultipartData is a universal class used for all multipart sections on both the client and the server. The difference is how it is used:

 

•On the client, you assign property values before sending the data.
•On the server, you read the property values before processing the received data.

 

In addition, the Stream and Text properties are meaningful only on the client, while the Start and Size properties are available only on the server.

 

To better understand how to use this class, see the examples in the Demos\WebRequest\ and Demos\HttpServer\ directories.

 

 

See also

TScHttpMultipartDataList.Parts

TScHttpClientMultipartDataList

TScHttpServerMultipartDataList

SecureBridge Components, Copyright © 2007-2026 Devart. All Rights Reserved. Provide Feedback Visit Forum Request Support
╳