I’m in deep geekout mode at work. I have been for the past couple of days. I’ve been working since Monday on getting a more streamlined file upload script working for our work server, and yesterday I finally developed something that I’m happy with. It’s based on a heavily modified version of Zach White’s PHP Uploader Downloader… There’s probably less than a third of his original code left, but working from his code saved me a huge chunk of time.
Once I figured out what his script did, I was able to start slicing huge chunks out… “This is a drop box! They don’t need to download anything from here, so that subroutine is out… With that gone, we don’t need them to choose if they’re uploading or downloading, so that can go… Hey! A lot of this can be split off into a form on another page! Actually, that form can go pretty much anywhere if we need it… I’ll just snip that out and put it somewhere safe for now…”
After it was pared down to almost nothing, I started building it back up and adding features. The trick that I’m proudest of is the way that it automatically creates a text file with all of the information that the client enters in their work order. It may not seem all that impressive to professional code jockeys out there, but I was an English major! This is heavy-duty stuff as far as I’m concerned. I’ll see if I can make things generic enough that I can post the source code here without creating a huge security hole on our server.
Anyway, I’m going to spend today prettying it all up for public display. It may go live on the work site as early as this afternoon… We’ll see.