Hi, I'm struggling to get a form which uses a FileUploadWidget to cooperate with a model that uses filedepot's UploadedFileField as a column type. It works fine on Windows, but fails on a "posix" like platform - both Linux and Mac.
The problems seems to be that when I extract the "fp" entry from the value of my particular widget it seems to be a different thing between the two platforms. On Windows this is a tempfile._TemporaryWrapper, which contains a _io.BufferedRandom in it's 'file' attribute. On Posix the 'fp' entry is the io.BufferedRandom object directly. Down in the guts of depot this object (called 'content') is then expected to have a 'filename' attribute, or failing that 'name' attribute. It happens to have a 'name' attribute, but this is the integer value of the socket descriptor and not any file name. The code is expecting to have a str at this point, and so an exception is raised. I'm sure that combining these two technologies is quite common, so I must be doing something wrong. I have also had to patch another "impedance mismatch" between these two libraries - the FileData that is passed to the colandar.SchemaNode has to be overridden to fix the lack of 'uid' attribute in the data that is being serialized. Is there something I have to do in the deserialize method as well? Many thanks for any help. Regards Luke -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/e12ffe01-106b-4161-b2d3-c2cdc5310765n%40googlegroups.com.