22-01-2022, Saat: 14:38
Selamlar;
İzinleri veriyorum. Ftp'ye bağlanıyorum. Dosyaları listeliyorum. Fakat telefona kaydettiremiyorum.
Tpath.GetMusicPath, Tpath.GetHome ve bütün alternatifleri denedim. (Delphi 11). Herhangi bir hata da vermiyor.
Neden olabilir? (Entitlement List>Secure File Sharing = True)
İzinleri veriyorum. Ftp'ye bağlanıyorum. Dosyaları listeliyorum. Fakat telefona kaydettiremiyorum.
Tpath.GetMusicPath, Tpath.GetHome ve bütün alternatifleri denedim. (Delphi 11). Herhangi bir hata da vermiyor.
Neden olabilir? (Entitlement List>Secure File Sharing = True)
procedure TForm1.FormCreate(Sender: TObject); begin MobilePermissions1.Dangerous.AccessCoarseLocation := True; MobilePermissions1.Dangerous.ReadExternalStorage := True; MobilePermissions1.Dangerous.WriteExternalStorage := True; MobilePermissions1.Dangerous.RecordAudio := True; MobilePermissions1.Apply; end;
procedure TForm1.topload;
var StrLst: TStringList;
ktr : integer;
begin
IdFTP1.Host := 'ftp.xxx.com';
IdFTP1.Username := 'yyyy';
IdFTP1.Password := 'zzzz';
IdFtp1.Passive := True;
IdFtp1.TransferType := ftBinary;
IdFtp1.ConnectTimeout := 10000;
try
if not IdFtp1.Connected then IdFtp1.Connect();
IdFtp1.BeginWork(wmRead);
IdFTP1.ChangeDir('/public_html/wordpress/wp-content/uploads/01');
except
on E:Exception do
begin
ShowMessage('FTP bağlantı hatası:' + E.Message);
Exit();
end;
end;
procedure TForm1.ftplistele; var StrLst: TStringList; ktr : integer; Litem : TListviewitem; Begin StrLst := TStringList.Create; try IdFTP1.List(StrLst, '', false); for ktr := 0 to StrLst.Count -1 do begin if (idFTP1.DirectoryListing.Items[ktr].FileName <> '.') and (idFTP1.DirectoryListing.Items[ktr].FileName <> '..') then begin LItem := listView1.Items.Add; LItem.Text := StrLst[ktr]; IdFTP1.Get( LItem.Text, Tpath.GetMusicPath + LItem.Text, True ); end; end; finally StrLst.Free; end; End;
