extrac code from scala upload file

extract code from scala doc for upload file.
add an additional router usage line.