partially fix the upload

this fixes the javascript issue, but I'm getting a titan exception that I haven't tracked down yet.