improve browser compatibility with file upload