File transfer mode.


There are two modes of file transfer via FTP:



  • Text (ASCII) is a mode for transferring text files, html documents, php scripts, and so on.

  • Binary (binary, binary, bin) is a mode for transferring images, executable files, executable cgi scripts, and so on.


For the average user, this is rather useless information, but sometimes it becomes very relevant. For example, if you upload an image to the server, where it turns out to be corrupted and is not shown in the browser, although it is available via the web. This happens when a file with an image (jpg, gif, bmp, png,..), which is binary, is transmitted to the server not in binary, but in text mode. As a rule, this is due to the incorrect operation of the FTP program.


Text files cannot be transferred in binary mode, and binary files cannot be transferred in text mode. In general, FTP programs by default should determine themselves in which mode specific files should be transferred. However, sometimes they make mistakes and files are uploaded incorrectly. In this case, you will have to configure the FTP program so that it correctly transfers the necessary types of files.