On Fri, Jun 6, 2008 at 2:26 AM, David Pariente <[EMAIL PROTECTED]> wrote:
> i tried this, but crashes when file is not selected:
>
> if (myFileReference.name.length>0) { myFileReference.upload() }
It raises a runtime error because if you haven't selected a file
fileReference.name is null. you should check for this condition:
if (myFileReference.name && myFileReference.name.length > 0)
myFileReference.upload();
hope this helps,
--
Alberto Brealey-Guzmán

