FileDownload

The event FileDownload fires during the processing of a job when the ITP/Server wants to send a file to the client application. Handlers of the FileDownload event should be of type Aia.ITP.Server.Job.FileDownloadHandler:

delegate string FileDownloadHandler(string filename);

A FileDownload handler receives a parameter filename which specifies a suggestion for the name of the file that is being sent by ITP/Server. The return value of the handler should be the name of the file as which the downloaded file will be stored. It is also possible to refuse the download by returning null or throwing an exception. This will cause the ITP/Server job to fail immediately. If no event handler is installed for the event FileDownload and the ITP/Server tries to send a file for download, the job will fail as well.