Esp32 image transfer not all ftp tcpip packets arrive

I know of no way to make the FTP server to inform my c++ script running on my ESP32-CAM that the file transfer failed.
Do you know of any way to do that?