killkolor schrieb: > Hi! > > I have to upload the bytestream of a .png image (can't be normal > fileupload, since it automatically comes out of a 3d engine) to a > server side turbogears page. My first simple approach does not work > unfortunately: > @expose() > def test_upload(self, fileUpload): > from kunsthaus.model import UnityScreenshot > UnityScreenshot(picture=fileUpload) > > where picture inside UnityScreenshot is a BLOBCol(). This gives an > error "Type Error: not indexable" > I guess I have to somehow typecast it first (maybe a validator?). But > I have no idea how... > Has anybody some sample code for this? (Storing to a disk file or to a > BLOBCol is both fine)
Check what type fileUpload actually *is* and then you will see that you need to read the actual bytes from it and pass these. Diez --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" 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/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

