Downloading a file from Github with TWebCopy 2.5.5.0 in Delphi 12 does not work!
I get no error event messages from TWebCopy. The only events I get are:
TForm1.WebCopy1FileStart: idx = 0
TForm1.WebCopy1CopyCancel:
Please see the attached test project.
Unfortunately, there is no documentation about TWebCopy!
TWebCopyTest.zip (76.5 KB)
The reason here is that github puts this behind a redirect URL and the redirect URL has many characters on the filename, some of which cannot be used in a valid Windows filename.
So, the solution to avoid this is setting the target filename
with WebCopy1.Items.Add do
begin
URL := Trim(EditURL.Text);
TargetDir := Trim(EditDownloadTarget.Text);
TargetFilename := 'SVGShellExtensionsSetup.exe';
end;