Comment 5 for bug 525260

Revision history for this message
foxbunny (bg-branko) wrote :

This is not _completely_ backwards-compatible.

The old behavior was that, if the file field does not have {} as default value, it assigns file contents as value. If default is {}, FieldStorage instance is assigned as value. The former doesn't work anymore with this patch. Regardless of whether you set {} as default, or not, File field behaves exactly the same (which is kind of the point of this ticket).

Now a question: was the point of backwards-compatibility to keep the storify behavior where it gives you only the file contents if no default value is set in web.input? Personally, I think that is a bit pointless, but I'm sure it has its uses. Just not very convenient when you want to use it with web.form.