If the filename in the variable theFile has spaces in it then that will be a problem. I hate spaces in filenames!
To things:
First you will need to use the absolute path for the file. When the do shell script runs you can't rely on it being in a specific directory. You also can' rely on the environment being set up. So if you wanted to list out your Desktop folder for example you would need to do:
do shell script "ls /Users/homefolder/Desktop"
Second if the file name has spaces in it (or even if it might) you will need to do
do shell script "curl -T '" & theFile & "' ftp://username:password@........
That is add a single quote before the double quote after the -T and then add a single quote after the double quote before the ftp command. No spaces between the single and double quotes,
These should finally get this going.
good luck