Skip to content

Commit 0f3c5cb

Browse files
Improve texts
1 parent 3e66f8e commit 0f3c5cb

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

blacksheep/docs/binders.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -359,14 +359,14 @@ def home(accept: FromAcceptHeader, foo: FromFooCookie) -> Response:
359359
BlackSheep 2.6.0 introduces major improvements for handling `multipart/form-data` requests with the `FromForm` and `FromFiles` binders:
360360

361361
- **Memory-efficient file handling**: Files use `SpooledTemporaryFile` - small files (<1MB) stay in memory, larger files automatically spill to temporary disk files
362-
- **True streaming parsing**: New streaming API for processing multipart data without buffering the entire request body
362+
- **True streaming parsing**: New streaming API for processing multipart data without buffering (`async for part in request.multipart_stream()`)
363363
- **Automatic resource cleanup**: The framework automatically cleans up file resources at the end of each request
364364
- **Better file API**: `FileBuffer` class provides clean methods (`read()`, `seek()`, `close()`, `save_to()`) for working with uploaded files
365365
- **OpenAPI documentation**: `FromText` and `FromFiles` are now fully documented in OpenAPI schemas
366366

367367
///
368368

369-
### FromForm: Application/x-www-form-urlencoded and Multipart
369+
### FromForm: Form URL encoded and Multipart
370370

371371
The `FromForm` binder handles both `application/x-www-form-urlencoded` and `multipart/form-data` content types:
372372

@@ -454,7 +454,7 @@ from blacksheep import post, Request, created
454454

455455
@post("/upload-large")
456456
async def upload_large_files(request: Request):
457-
# Stream multipart data without buffering entire request body
457+
# Stream multipart data without buffering
458458
async for part in request.multipart_stream():
459459
if part.file_name:
460460
# This is a file upload

blacksheep/docs/requests.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,9 +324,9 @@ Files are read from `multipart/form-data` payload.
324324
content = file_buffer.read()
325325
```
326326

327-
=== "Memory-efficient streaming (2.6.0+)"
327+
=== "Streaming multipart"
328328

329-
For handling large file uploads efficiently without loading the entire request body into memory:
329+
For handling large file uploads without buffering:
330330

331331
```python
332332
from blacksheep import post, Request, created

0 commit comments

Comments
 (0)