The most logical thing for me to do would be to modify the perl script to push a copy of any file uploaded to the ftp site also. But I looked at the perl script and though “Cripes, I’ve forgotten everything I ever knew about perl.” I looked at Uber-Uploader since it’s written in php which I can manage a bit better and has a perl component so the upload file size can be larger than with php without fiddling with php.ini settings. But I couldn’t get Uber-Uploader to run on DH. Then I started looking at python ways to do it since I need to get better with python.
I got python to work for me thusly:
print "Logging in…"
ftp = ftplib.FTP()
# move to the desired upload directory
print “Currently in:”, ftp.pwd()
fullname = '../sourcedirectoy/filename'
name = os.path.split(fullname)
f = open(fullname, "rb")
ftp.storbinary('STOR ' + name, f)
But now I’ll have to see if I can make it work on a whole directory. If I were clever, I’d run this python script every few hours as a cron job, and test the source directory for any file newer than last time the script ran in a cron. If I were really clever, I’d just add the ftp push to my original perl script.