diff --git a/streaming_form_data/targets.py b/streaming_form_data/targets.py index 80cb44e7..35e66cab 100644 --- a/streaming_form_data/targets.py +++ b/streaming_form_data/targets.py @@ -107,9 +107,9 @@ def on_finish(self): value = b"".join(self._temp_value) self._temp_value = [] - if self._type == str: + if self._type is str: value = value.decode("UTF-8") - elif self._type == bytes: + elif self._type is bytes: pass # already is bytes, no need to do anything else: value = self._type(value)