diff --git a/requests_toolbelt/multipart/encoder.py b/requests_toolbelt/multipart/encoder.py index 2d539617..53d2b262 100644 --- a/requests_toolbelt/multipart/encoder.py +++ b/requests_toolbelt/multipart/encoder.py @@ -228,6 +228,7 @@ def _iter_fields(self): else: file_name, file_pointer, file_type, file_headers = v else: + file_name = requests.utils.guess_filename(v) file_pointer = v field = fields.RequestField(name=k, data=file_pointer,