[Solar-talk] Lux_Filesystem_Upload
Antti Holvikari
anttih at gmail.com
Mon Nov 5 07:25:33 CST 2007
On 11/5/07, Rodrigo Moraes <rodrigo.moraes at gmail.com> wrote:
> On Nov 5, 2007 11:04 AM, Jeff Surgeson wrote:
> > Assuming the _config[replace] option is false then the
> > Lux_Filesystem_Upload::_validateFile() method will always produce an
> > exception as it only checks if path exists and not if the file being uploaded
> > exists.
> >
> > I assume that the purpose of the function is to see if the file exists and if
> > it does based on the config option replace or produce exception, right?
>
> The purpose is to compare if the destination filename exists and allow
> a replacement, or throw an exception if 'replace' is false. The class
> does not check if the 'file' field of a form was empty. This is out of
> the scope of the class and you have to check it in your app. Makes
> sense?
Hmm, I think it's confusing that it says $path, when it should say
$file. There is nowhere said that the destination should be a file or
a path. Jeff, am I correct that this confuses you?
> That said, Antti and I discussed some improvements for the class
> interface some time ago. Not too much changes, but I should have taken
> notes... :)
Yep, I think I remember them. :-)
--
Antti Holvikari
More information about the Solar-talk
mailing list