before file upload