zhuyifei1999 added a comment.
I thought of some ways to fix/workaround this issue: - WONTFIX for python 2 and move on to python 3 - really? Tool labs still have python 2 by default. - Use the hack mentioned in StackOverflow (replace every \n with \r\n) - since we are working with binary data, this isn't desirable either. - Code our own MIMEMultipart - I'm not an expert on how http transfers file data, so idk how difficult this would be. - Base64 encode file contents - This would mean an increase in the bytes that are transferred for each upload, so users might feel a longer upload time. TASK DETAIL https://phabricator.wikimedia.org/T132676 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: zhuyifei1999 Cc: pywikibot-bugs-list, Matanya, matmarex, czar, Aklapper, Steinsplitter, zhuyifei1999, Bawolff, jayvdb, Fabrice_Florin _______________________________________________ pywikibot-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
