UPLOAD SUPPORT! (and code restructuring; sorry)
uploader script (example)