Apparently this line of code causes the problem:
'Content-Disposition: form-data; name="file"; filename="%s"' % requestFile.name,
The correct line would be instead:
'Content-Disposition: form-data; name="file"; filename="%s"' % smart_str(requestFile.name),