Skip to content

Commit

Permalink
Use AsyncIterablePayload instead of BufferedReaderPayload
Browse files Browse the repository at this point in the history
  • Loading branch information
jerome-viveret-onfido authored Nov 16, 2023
1 parent f8325d7 commit 8dedfcd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions onfido/aio_resource.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from aiohttp import BufferedReaderPayload, ClientSession, MultipartWriter, StringPayload
from aiohttp import AsyncIterablePayload, ClientSession, MultipartWriter, StringPayload
from .exceptions import OnfidoRequestError
from aiohttp.client_reqrep import ClientResponse
from .onfido_download import OnfidoAioDownload
Expand Down Expand Up @@ -69,7 +69,7 @@ async def _upload_request(self, path, file: BinaryIO, **request_body):
)

file_part = mpwriter.append_payload(
BufferedReaderPayload(
AsyncIterablePayload(
file,
content_type=mimetype_from_name(file.name),
headers={
Expand Down

0 comments on commit 8dedfcd

Please sign in to comment.