fixed javascript upload