Html Input Type File Javascript Substring Syntax