cStringIO.StringIO is a file-like object. The code "saves" the thumbnail to 
that object and then passes it to the .store() method, which treats it like 
an actual file.

Anthony

On Friday, September 7, 2012 4:24:46 PM UTC-4, BlueShadow wrote:
>
> Anthony you are the best. I got pretty much no Idea what your code does 
> but it works perfectly. for all people who have the smae problem I posted 
> the complete working app.
>
> regards BlueShadow
>
> On Friday, September 7, 2012 7:24:33 PM UTC+2, Anthony wrote:
>>
>> How about if you do something like:
>>
>> from cStringIO import StringIO
>> tmp = StringIO()
>> im.save(tmp, 'jpeg')
>> tmp.seek(0)
>> thisImage.update_record(thumb=db.Images.thumb.store(tmp, filename=
>> 'thumbnail.jpg'))
>>
>> Anthony
>>
>>

-- 



Reply via email to