Upload file with multipart/formdata
Thomas Guettler
zopestoller at thomas-guettler.de
Fri Nov 8 09:37:06 EST 2002
Skip Montanaro schrieb:
> Thomas> I want to upload a binary file with the script from:
> Thomas> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/146306
>
> Thomas> ASCII files get uploaded without problem, but binary data gets
> Thomas> cut before all 0xA1 bytes.
>
> Just taking an educated guess since I can't get to ActiveState's website to
> browse that recipe, but...
>
> Open the file in binary mode, e.g.
>
> f = file("somefile", "rb")
Now it works! Thank you very much
thomas
More information about the Python-list
mailing list