I needed to separate out the functionality of upload so it could be called from a script, but got into a world of pain when trying to determine the error return status. So, I decided to split up Upload.pm so that the CGI
operations are strictly separate from the actual file manipulations. See attached patch and associated tests. Also fixes a missing parameter in the attach script.
Note that the is one major remaining code smell; the use of $query->tmpFileName, which is undocumented and seems sometimes not to work, at least when running the tests from my Windows machine. The documented 'upload' method should really be used instead.
There are three files attached: one for the tools directory one for bin, and another for lib. They are three halves of the same patch.
- 13 Apr 2004
I've commited this into CVS
- 14 Apr 2004