Posting gzip'd image file - server says Malformed Upload?
Michael Torrie
torriem at gmail.com
Wed Jun 17 21:10:18 EDT 2015
On 06/17/2015 06:45 PM, Paul Hubert wrote:
> On Wednesday, June 17, 2015 at 8:24:17 PM UTC-4, Chris Angelico wrote:
>
>> Are you sure you want iteration and writelines() here? I would be
>> inclined to avoid those for any situation that isn't plain text. If
>> the file isn't too big, I'd just read it all in a single blob and then
>> write it all out at once.
>>
>> ChrisA
>
> Do you think that would fix my issue?
I recommend you try it and see. That's the only way to know. We don't
know any details of your program or situation really, so we can only guess.
> Could you give me an example?
Instead of writelines(), just write() the data. There are examples in
the official python docs I'm sure.
More information about the Python-list
mailing list