![]() |
![]() ![]() ![]() |
auHTTP component.
|
property HideOutputFile: Boolean;
|
The HideOutputFile property determines whether the file (specified in OutputFileName property), which created to store the data of downloaded document, should be hidden in file system (should have "hidden" and "temporary" file attributes set).
|
|
Use the HideOutputFile property together with OutputFileName, if you don't want to use memory streams for downloaded files, and don't want to show downloaded files in the file system.
|
|
![]() |
auHTTP1.URL := 'http://www.domain.com/filename.zip';
|
auHTTP1.OutputFileName := 'c:\filename.zip';
|
auHTTP1.HideOutputFile := True;
|
auHTTP.Read;
|
|
// and when file will be successfully downloaded you can
|
// change the file attributes to Normal in the OnDone event handler
|
procedure TForm1.auHTTP1Done(Sender: TObject; const ContentType: string;
|
FileSize: Integer; Stream: TStream);
|
begin
|
// set file attributes to normal
|
Windows.SetFileAttributes(PChar(FileSize), FILE_ATTRIBUTE_NORMAL);
|
end;
|
|
OutputFileName property;
|
OnDone event and Read method.
|