File corruption during ftp transfer ASCII vs. BINARY
Occasionally, issues occur with files becoming corrupt when uploading through FTP. When viewing the corrupted file through the browser, the following error will be thrown.
"This image can not be displayed because it contains errors"
This is typically caused by uploading files through FTP as ASCII file transfer type. The "ASCII transfer type" will transfer the files as regular text files. The "Binary transfer type" will transfer the data in binary mode which handles the files as binary data instead of text data. Setting your FTP client to Binary will prevent your files from becoming corrupted through ftp transit. Please see the following on how to switch your FTP program to Binary.
It's also been brought to our attention that another possible cause of file corruption during FTP transfers, could be from your local firewall. Please also check for any updates to your firewall software, and possibly restart your router as well, if switching your FTP client settings to binary doesn't work.
Changing your ftp program to binary transfer
You can change the transfer type in your ftp program to Binary. All FTP programs should have this functionality. The following steps will demonstrate how to change the transfer type from ASCII to Binary in Filezilla.
- Open your Filezilla ftp program.
- Select "Edit" and click "Settings" from the drop Box.
- In the "Select page:" box, under "Transfers", click "File Types".
- In the "Default transfer type" section, select the "Binary" radio button.
Now when you connect to your server with ftp, files will be treated as Binary files. This should prevent the files from becoming corrupted.
We value your feedback!
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
new! - Enter your name and email address above and we will post your feedback in the comments on this page!
2014-10-23 8:05 am
Why if settings above are correct file is still corruption on destination server
2014-10-23 11:23 am
Thank you for your question. We are happy to help, but will need some additional information.
Are you getting any errors?
You can enable logging in FileZilla, which can provide more details.
You may want to try zipping the file first (to protect it from corruption), then uploading it via FTP. Then unzipping it once it is uploaded.
If you have any further questions, feel free to post them below.
2014-10-23 8:09 am
Although transfer setting in Filezilla, Winscp and MobaXterm were set to transfer a .mp4 file as binary to a remote server, and the file was transferred, it seemed to have been converted to ASCII.
How do I prevent this?
Could it be the setup of the remote server.
2014-10-23 11:45 am
Thank you for your question. Transferring a file via binary, or ASCII should not convert the file in any way. It is just the means of transferring.
For example, it is like using Fedex, instead of UPS for shipping. In the end the package will be the same.
How are you viewing the file? Can you provide a link to it?