this work for me, in your field upload - 6 Add Late Server Side Code Here
Mem:FotoExtension = upper(st.ExtensionOnly(p_web.GSV('Loc:Path')))
IF NOT INLIST(Mem:FotoExtension,'JPG','GIF','TIFF','PNG') OR p_web.GSV('Loc:Path')=''
loc:invalid = 'Loc:Path'
loc:Alert = 'FOTO INVALIDAD SOLO SE ACEPTAN: JPG,GIF,TIFF,PNG'
p_web.Script('ntAlert("Invalid Document Type.","ALERT");')
remove(p_web.GSV('Loc:Path'))
p_web.ssv(Loc:Path,'')
CLEAR(Loc:Path)
CLEAR(Mem:FotoExtension)
EXIT
END