[Solar-talk] Lux_Filesystem_Upload

Rodrigo Moraes rodrigo.moraes at gmail.com
Mon Nov 5 07:12:56 CST 2007


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?

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... :)

-- rodrigo


More information about the Solar-talk mailing list