Unit 'fpHTTPClient' Package
[Overview][Constants][Types][Classes][Procedures and functions][Index] [#fcl]

TFPCustomHTTPClient.FileFormPost

Performs an HTTP POST request with file upload

Declaration

Source position: fphttpclient.pp line 366

public procedure TFPCustomHTTPClient.FileFormPost(

  const AURL: string;

  const AFieldName: string;

  const AFileName: string;

  const Response: TStream

);

procedure TFPCustomHTTPClient.FileFormPost(

  const AURL: string;

  FormData: TStrings;

  AFieldName: string;

  AFileName: string;

  const Response: TStream

);

Arguments

AURL

  

The URL to upload the file to

AFieldName

  

The form field name for the file upload

AFileName

  

The filename to upload

Response

  

Variable to store the response content as string

Arguments

AURL

  

The URL to upload the file to

FormData

  

Additional form data to include with the file upload

AFieldName

  

The form field name for the file upload

AFileName

  

The filename to upload

Response

  

Variable to store the response content as string

Description

Performs an HTTP POST request with file upload using multipart/form-data encoding. This method allows uploading files as part of a form submission.

Errors

May raise HTTP-related exceptions on connection errors or invalid responses.

See also

FormPost

  

Performs an HTTP POST request with form data

StreamFormPost

  

Performs an HTTP form POST with stream upload


Documentation generated on: Jan 27 2026