working upload with js