Re: Upload class 0.6

From: Date: Fri, 10 Aug 2001 16:25:48 +0000
Subject: Re: Upload class 0.6
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-1375@lists.php.net to get a copy of this message
Bertrand Mansion wrote: > > le 10/08/01 16:27, Tomas V.V.Cox à cox@idecnet.com a écrit : > > > Do you think is good also for Pear? > > It looks globally OK for me. My concerns : > > nameToSafe is not Mac OS compliant (and probably not Windows compliant > neither). On a Mac, filenames are 32 chars max. I would count 3 chars max > for the extensions. That would make 28 chars max for the name (plus the > dot). Umm.. but I guess that php runs only in MacOsX, and as it's based on FreeBSD this limitation... still exists? Windows vfat supports 255cc file names. > isUpload is not a really explicit name. Maybe isCorrectUpload or just > isError would be enough. I hate a little too long method names, but true, a isValidUpload could make sense also. isError() is not enought. I implemented the support for three different situations: isUpload() -> user submits the file successfully isMissing()-> user didn't upload any file (not really an error but you may want to check that if the upload is a requirement) isError() -> user submits a file but with errors (probably due to excess the max allowed file size). ("Developer" errors are also detected) > Error management in different languages is a bit difficult to use. You may > have two solutions : first, you could let users override your error class > with their own language or you can return only error codes which they will > have to describe in globals for example. > What I mean is that you shouldn't expect users to go look into their > /usr/lib/php/pear directory to add their own error sentences. IMO. My intention was to let people translates messages in his language and send them to be added to the class :) I think that is a error to provide a too complicated system only to show error messages in different languages. > Apart from that, I don't see why it shouldn't be in PEAR. I'll commit it to pear/HTML_Uploader if nobody objects, ok? Tomas V.V.Cox

« previous php.pear.dev (#1375) next »