We have devices that run a proprietary FTP client on them. They retrieve media files (AVI videos and Images) as well as XML files from our web service utilizing a python based FTP server. The problem I'm having is that the FTP client wants to download the media files in ASCII mode instead of binary mode. I'd like to continue to use our python FTP server (pyftpdlib) but I can't figure out a way to force the client to use binary mode.
I've skimmed through the FTP RFC looking for a command/response sequence that would allow our FTP server to tell the FTP client to use binary instead of ASCII. Does such a command/response sequence exist?
You can override the default behaviour or you ftp server by using a custom FTPHandler and overriding the FTPHandler.ftp_TYPE(filetype) method and this way force your server to serve file in binary mode self._current_type = "i".
Can you force an FTP client to use binary from the server side