

So there's usually no need to issue the binary command if you download an image file. Most popular FTP clients (the BSD command line client included) already use the binary or image type by default. Other files that need to be downloaded using the binary transfer type include: Image files aren't the only files that should be transferred using image mode. This executes the TYPE A command, where A stands for ASCII, and sets the transfer mode to ASCII. The reason why we had a problem earlier was because I actually issued the ascii command (not shown in the screenshot) before downloading the file. This worked because an image file requires an image or binary transfer mode, which transfers files as is. The same thing happens when we load the image file using the Image Viewer. But now, when we try to open the file using the gThumb application, we can now see the actual image. This command tells the server that the transfer is going to involve a file with a binary data type and to prepare for a binary mode transfer.

Image mode and Binary mode mean the same thing in FTP. The actual command that's sent to the server is TYPE I, where I stands for Image. This time, let's issue the Binary command before executing the Get command. Clearly, there's something wrong with the file. Now, here's what we see when we try to load the image using the Image Viewer. You can see it only shows the JPEG icon instead of the image itself. Here's what happens when we try to open the file using the Linux gThumb application. However, when you try to open the file, that's when you'll see the problem. Notice how the download proceeds without any issues. Let's download an image file named firefox.jpg using the FTP GET command. Let's begin our discussion with an example of using binary vs. In this post, we help you understand the nuances and differences between FTP binary and ASCII data types (transfer modes) so you can avoid these issues. Are you receiving corrupt files during FTP transfers? It might simply be ,=to an incorrect data type setting.
