Buenas!... aquí estoy de nuevo.. siento no rondar con tanta frecuencia como antes.. pero los estudios no me lo permiten...
He leido el artículo y el código fuente de un tal Andrew (no recuerdo el apellido) sobre cómo hacer un servidor ftp en Delphi usando las Indy..
luego he encontrado el código fuente traducido en
http://www.clubdelphi.com/foros/show...ight=%2Aftp%2A
www.sotrono.gratishost.com/ServerFTP.zip
Y... al probar el código.. me doy cuenta de que al subir algún dato al servidor.. el archivo se pasa completamente...
pero no se llega a finalizar la subida de datos, es decir, se queda colgado sin enviar datos, en vez de refrescar el directorio y dar por finalizada la subida de datos.
Este es el procedure del servidor para cuando el cliente va a subir algo al servidor
Código Delphi
[-]
procedure TMainForm.IdFTPServerStoreFile(ASender: TIdFTPServerThread;
const AFileName: String; AAppend: Boolean; var VStream: TStream);
var APath : string;
begin
APath := StrGetRealPathName(TFTPClient(ASender.Data).RootPath,ASender.CurrentDir,AFilename);
if DirectoryExists(ExtractFilePath(APath)) then
begin
if AAppend then begin
VStream := TFileStream.Create(APath, fmOpenWrite or fmShareExclusive); VStream.Seek(0, soFromEnd); end
else
VStream := TFileStream.Create(APath, fmCreate or fmShareExclusive); end
else
raise Exception.Create(Format('%s: Errorirectorio inexistente o archivo ocupado',[AFilename]));
end;
Utilizo Delphi 7, WinXp y pasta dental Colgate.
Muchísimas gracias, simplemente, por leerme.