Commits

Torsten Irländer committed 0eed48c

Added convertion for fields of type file.

Comments (0)

Files changed (1)

             except ValueError:
                 msg = "%s is not a boolean value." % value
                 self._add_error(field.name, msg)
+        elif dtype == 'file':
+            try:
+                # filename = value.filename
+                converted = value.file.read()
+            except AttributeError:
+                return None
+            except ValueError:
+                msg = "%s is not a file value." % value
+                self._add_error(field.name, msg)
         elif dtype == 'date':
             if not value:
                 return None