file upload: code review 1, need to implement EOF