fix corrupted file upload issue because of line breaks