TFile.Upload() - How to abort and how to retrieve response?

According to the upload demo I use a TWebFilePicker to have the user select a file. Then on button click I do:

webfilepicker1.Files[0].Upload('some url');

The UploadComplete event unfortunately does not contain the response received from the server. How to access the server response? In my case, the server returns some JSON with the FileID under which the uploaded file was stored.

How to abort the upload of a large file when the user wishes so? I tried Result := False as well as Abort during a Progress event, but this doesn't abort the upload.

Kind regards, Walter

  1. The response was not returned yet. We extended the component. It will have an event OnFileUploadResponse: TFileUploadResponseEvent that will return the response as object and as string.
  2. We have added a new function AbortUpload; that can be used from the OnFileUploadProgress event

Thank you Bruno!
Will this already be implemented in the upcoming version 1.6?

It will