Hello. I need help for showing the progress while uploading a file to my ftp server. I dropped a TProgressBar on my form and want to show the upload progress in it.
My upload codes are like this.
procedure UploadMyFile(File2Uploadchar; targetfilenamechar);
const
TheFtpPort=21;
begin
intopen := internetopen('iexplore',INTERNET_OPEN_TYPE_DIRECT,nil,nil,0);
intconn := internetconnect(intopen,'ftp_path',TheFtpPort,'userid','password',INTERNET_SERVICE_FTP,INTERNET_FLAG_PASSIVE,0);
sleep(100);
ftpputfile(intconn,File2Upload,targetfilename,FTP_TRANSFER_TYPE_UNKNOWN,0);
internetclosehandle(intconn);
internetclosehandle(intopen) ;
end;
procedure TForm2.Upload1Click(Sender: TObject);
begin
uploadmyfile('test.doc', 'document/test.doc');
end;
Thx for any advice
My upload codes are like this.
procedure UploadMyFile(File2Uploadchar; targetfilenamechar);
const
TheFtpPort=21;
begin
intopen := internetopen('iexplore',INTERNET_OPEN_TYPE_DIRECT,nil,nil,0);
intconn := internetconnect(intopen,'ftp_path',TheFtpPort,'userid','password',INTERNET_SERVICE_FTP,INTERNET_FLAG_PASSIVE,0);
sleep(100);
ftpputfile(intconn,File2Upload,targetfilename,FTP_TRANSFER_TYPE_UNKNOWN,0);
internetclosehandle(intconn);
internetclosehandle(intopen) ;
end;
procedure TForm2.Upload1Click(Sender: TObject);
begin
uploadmyfile('test.doc', 'document/test.doc');
end;
Thx for any advice