Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem when uploading or downloading a file with FTPES security type #41

Open
rafadompas opened this issue May 19, 2024 · 0 comments
Open

Comments

@rafadompas
Copy link

This problem is happening to me since version 2.0.0. With previous versions it worked well in both FTP and FTPES.
The problem is that when I connect with FTP security type, it works perfectly, but when I connect with FTPES security type, the code stays in the uploadfile until the error occurs: Timeout reached for Receiving response ! (Response: null) .

I have added onProgress to the uploadFile to see what the function does and it is surprising that the file is reported as uploaded:
await ftpConnect.uploadFile(file,
onProgress: (progressInPercent, totalReceived, fileSize) {
setState(() {
print("porcentaje progreso: ${progressInPercent.toString()}");
print("Total Recibido: ${totalReceived.toString()}");
print("Tamaño fichero: ${fileSize.toString()}");
});
});
Result:
I/flutter ( 6606): [2024-05-19 14:35:39.635652] Start uploading...
I/flutter ( 6606): porcentaje progreso: 34.04
I/flutter ( 6606): Total Recibido: 65536
I/flutter ( 6606): Tamaño fichero: 192512
I/flutter ( 6606): porcentaje progreso: 68.09
I/flutter ( 6606): Total Recibido: 131072
I/flutter ( 6606): Tamaño fichero: 192512
I/flutter ( 6606): porcentaje progreso: 100.0
I/flutter ( 6606): Total Recibido: 192512
I/flutter ( 6606): Tamaño fichero: 192512
I/flutter ( 6606): FTPConnectException: Timeout reached for Receiving response ! (Response: null)

It returns 100% and the total file size, but then I look at the server and the file is there but with size 0.
The code stops in the uploadfile until it gives the timeout error that I indicated above.
This also happens with the downloadfile.
I have tried something that you told me, which is putting the transfer in binary mode, but it does the same thing.
We are concerned because we have had the server without TLS protection and we have decided to change it for protection against attacks. And now we have this problem.
The file we want to upload to ftp is a sqlite file with a .db extension
And I don't know if you need any other pointers that might help solve the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant