25 lines
734 B
Python
25 lines
734 B
Python
from app.central_storage.backend.business.document_manager import (
|
|
DocumentManager,
|
|
)
|
|
|
|
|
|
class DocumentHub:
|
|
def __init__(self, ):
|
|
self.document_manager = DocumentManager(self.user_id)
|
|
return
|
|
|
|
async def retrieve_document_info(self, document_id: str):
|
|
return await self.document_manager.retrieve_document_info(document_id)
|
|
|
|
async def upload_document(
|
|
self, associated_with: str, file_name: str, file_data: bytes
|
|
) -> bool:
|
|
"""Upload a file
|
|
Args:
|
|
file_name: the name of the file
|
|
file (bytes): the file to be uploaded
|
|
"""
|
|
return await self.document_manager.upload_file(
|
|
associated_with, file_name, file_data
|
|
)
|