Html Input Type File Javascript Substring Until Character