Originally Posted by neusight
I looked through your code and tried it out. It seems it's only for uploading images.
You just change it to whatever you want to upload. You need to get the correct mime type for your files. It's just a general purpose upload script, it just happens that images are one of the most popular items to upload.