From: ZProger <81753080+Zproger@users.noreply.github.com> Date: Thu, 16 Oct 2025 09:04:38 +0000 (+0200) Subject: Fixed a syntax error in the file upload example (#3692) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=def4778d622e8bf49a9fea4dda78cca4cf666d8a;p=thirdparty%2Fhttpx.git Fixed a syntax error in the file upload example (#3692) --- diff --git a/docs/quickstart.md b/docs/quickstart.md index 38da2fec..e140b53c 100644 --- a/docs/quickstart.md +++ b/docs/quickstart.md @@ -191,7 +191,7 @@ You can also explicitly set the filename and content type, by using a tuple of items for the file value: ```pycon ->>> with open('report.xls', 'rb') report_file: +>>> with open('report.xls', 'rb') as report_file: ... files = {'upload-file': ('report.xls', report_file, 'application/vnd.ms-excel')} ... r = httpx.post("https://httpbin.org/post", files=files) >>> print(r.text)