Skip to content
Advertisement

ftp_put is corrupting my movies after transfer, is it wrong?

I have a bunch of movies that I’m trying to transfer from my CentOS server onto my Windows PC. But when I run them through this script they end up being corrupt. Is there something wrong with the script?

Thanks

JavaScript

Advertisement

Answer

You’re trying to upload something other than a text-based file while using

JavaScript

You should be using FTP_BINARY instead of FTP_ASCII since movies (and images) are binary files.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement