beginning of file upload