HttpPostFile function

function HttpPostFile(Const URL, FieldName, FileName: string; Const Data: TStream; Const ResultData: TStrings): Boolean;

Unit
HTTPSend

Description
A very useful function, and example of use can be found in the THTTPSend object.

It implements the POST method of the HTTP protocol. This function sends the POST method for a URL document to an HTTP server.

This function simulate posting of file by HTML form used method 'multipart/form-data'.

Posting file is in DATA stream. Its name is Filename string. Fieldname is for name of formular field with file. (simulate HTML INPUT FILE)

The returned document is in the ResultData Stringlist. Returns boolean TRUE if all went well.