file upload logic hot fix