s3_upload_pdf
This commit is contained in:
@@ -70,6 +70,11 @@ class DataStore:
|
|||||||
raise TypeError(f"Unsupported data type for CSV upload: {type(data)}")
|
raise TypeError(f"Unsupported data type for CSV upload: {type(data)}")
|
||||||
await self.__s3_upload(key, body, "text/csv")
|
await self.__s3_upload(key, body, "text/csv")
|
||||||
|
|
||||||
|
async def s3_upload_pdf(
|
||||||
|
self, key: str, data: bytes, metadata: dict[str, object] = {}
|
||||||
|
):
|
||||||
|
await self.__s3_upload(key, data, "application/pdf", metadata=metadata)
|
||||||
|
|
||||||
async def __s3_upload(
|
async def __s3_upload(
|
||||||
self, key: str, body: bytes, content_type: str, metadata: dict[str, object] = {}
|
self, key: str, body: bytes, content_type: str, metadata: dict[str, object] = {}
|
||||||
):
|
):
|
||||||
|
|||||||
Reference in New Issue
Block a user