On Feb 12, 2009, at 9:56 PM, Anand Chitipothu wrote: > > 2009/2/13 malte <[email protected]>: >> >> I have a form that POSTs a few images. >> >> In the POST method, I rebuild the form, and call validates() on it. >> >> This breaks web.py, because it tries to unicodify() the image data, >> which makes python throw an exception. > > Are you using web.input like this? > > i = web.input(file={}) > data = i.file.value
Yep, that is what I do. Without that you just get the image in a string. It works, I get the image in the receiving script, but if I run validates() on the form object, we get the UTF8 failure. I am using web.py 0.31, python version 2.6 (tested 2.5 as well, which makes no difference. I have made a small change to the web.py code fixing the issue for me, but I am a web.py newbie, so not sure if my fix would have adverse effects for other users. Alec --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web.py" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/webpy?hl=en -~----------~----~----~----~------~----~------~--~---
