Just replace true with false in this line:
Instead of: FTP.UploadFile(File.DirInternal, "1.txt", True, "/somefolder/files/1.txt")
use:
FTP.UploadFile(File.DirInternal, "yourimage.jpg", False, "/somefolder/files/yourimage.jpg")
True is when upload a text file, False if for other type of file. Did you try it