Skip to content
Myr

Stringify the given file name (#545)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Taoufik · committed by Tom Christie · parent a05ba2e · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:httpx/multipart.py+1 added-1 removed
46 unmodified lines
47 self, name: str, value: typing.Union[typing.IO[typing.AnyStr], tuple]48 ) -> None:49 self.name = name50 if not isinstance(value, tuple):51 self.filename = Path(getattr(value, "name", "upload")).name51 self.filename = Path(str(getattr(value, "name", "upload"))).name52 self.file = value # type: typing.Union[typing.IO[str], typing.IO[bytes]]53 self.content_type = self.guess_content_type()54 else:55 self.filename = value[0]
66 unmodified lines