You are here: TWiki> Codev Web>MoreChangesToUpload (2004-08-20, CrawfordCurrie)
Tags:
create new tag
, view all tags
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.

-- CrawfordCurrie - 13 Apr 2004

I've commited this into CVS

-- SvenDowideit - 14 Apr 2004

WebForm
TopicClassification PatchAccepted
TopicSummary Code refactoring - does not impact end users. Move functionality out of bin scripts and into included modules.
InterestedParties

AssignedTo CrawfordCurrie
AssignedToCore SvenDowideit
ScheduledFor CairoRelease
RelatedTopics

SpecProgress 100%
ImplProgress 100%
DocProgress 100%
Topic attachments
I Attachment Action Size Date Who Comment
elsediff bin.diff manage 0.6 K 2004-04-13 - 19:14 CrawfordCurrie against latest anon CVS
elsediff lib.diff manage 10.8 K 2004-04-13 - 19:14 CrawfordCurrie against latest anon CVS
elsediff tools.diff manage 3.8 K 2004-04-13 - 19:15 CrawfordCurrie against latest anon CVS
Topic revision: r5 - 2004-08-20 - 08:08:49 - CrawfordCurrie
 

Codev

share: Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon
Twiki, Inc.
This site is powered by the TWiki collaboration platform
Ideas, requests, problems regarding TWiki? Send feedback
Copyright © 1999-2010 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.