|
7 | 7 |
|
8 | 8 | from litestar._layers.utils import narrow_response_cookies, narrow_response_headers
|
9 | 9 | from litestar.connection import Request
|
| 10 | +from litestar.datastructures import CacheControlHeader, ETag, FormMultiDict |
10 | 11 | from litestar.datastructures.cookie import Cookie
|
11 | 12 | from litestar.datastructures.response_header import ResponseHeader
|
12 | 13 | from litestar.enums import HttpMethod, MediaType
|
|
18 | 19 | )
|
19 | 20 | from litestar.handlers.base import BaseRouteHandler
|
20 | 21 | from litestar.handlers.http_handlers._utils import (
|
21 |
| - cleanup_temporary_files, |
22 | 22 | create_data_handler,
|
23 | 23 | create_generic_asgi_response_handler,
|
24 | 24 | create_response_handler,
|
|
65 | 65 | from litestar.app import Litestar
|
66 | 66 | from litestar.background_tasks import BackgroundTask, BackgroundTasks
|
67 | 67 | from litestar.config.response_cache import CACHE_FOREVER
|
68 |
| - from litestar.datastructures import CacheControlHeader, ETag |
69 | 68 | from litestar.dto import AbstractDTO
|
70 | 69 | from litestar.openapi.datastructures import ResponseSpec
|
71 | 70 | from litestar.openapi.spec import SecurityRequirement
|
@@ -683,7 +682,7 @@ async def handle(self, connection: Request[Any, Any, Any]) -> None:
|
683 | 682 | await after_response_handler(connection)
|
684 | 683 | finally:
|
685 | 684 | if (form_data := ScopeState.from_scope(connection.scope).form) is not Empty:
|
686 |
| - await cleanup_temporary_files(form_data=cast("dict[str, Any]", form_data)) |
| 685 | + await FormMultiDict.from_form_data(form_data).close() |
687 | 686 |
|
688 | 687 | async def _get_response_for_request(
|
689 | 688 | self,
|
|
0 commit comments