What type of file did you upload? Without looking at the script, the error implies that the file type you uploaded is not a valid type for the script. For example, you tried to upload a .txt document when the script only expects .jpg images.
I think it may be that the extension must be uppercase. I tried to upload an image with an upper case extension (i.e. picture.JPG instead of picture.jpg) and the script did something, although it still didn't work - this time it just timed out after about 30 seconds.