Writing byte stream as jpeg format to disk

Lawrence D'Oliveiro ldo at geek-central.gen.new_zealand
Sat Aug 28 00:58:59 CEST 2010

In message
<mailman.64.1282843346.29448.python-list at python.org>, Navkirat Singh wrote:

> I receive a jpeg file with the POST method.The file (.jpeg) is encoded in
> bytes, I parse the bytes by decoding them to a string. I wanted to know
> how i could write the file (now a string) as a jpeg image on disk.

I assume the JPEG data is received along with other field values in the 
POST. You’ll be saving those other fields in a database, right? So why not 
save the JPEG image there as well?

More information about the Python-list mailing list