|Manuals

TVirtualUI.DownloadFile Method

Description

This method facilitates sending files from a server to an end-user’s web browser for storage on their local system.

Syntax

procedure DownloadFile(
  const LocalFilename: WideString;
  const RemoteFilename: WideString;
  const MimeType: WideString
); safecall; overload;

Parameters

Parameter Type Description
LocalFilename WideString The name of the file located on the server that will be transmitted
RemoteFilename WideString The name assigned to the file when saved on the client machine
MimeType WideString Specifies the content-type header. When populated, the browser processes the file according to its type; when empty, triggers a download prompt

Notes

  • The MimeType parameter controls browser behavior: providing a value allows the browser to handle the content natively, while leaving it blank forces a download dialog
  • This is an overloaded method within the DownloadFile method group