This commit is contained in:
2025-04-29 00:00:47 -04:00
parent 56ba750aad
commit c9bba8a26e
25 changed files with 1266 additions and 152052 deletions

View File

@ -158,3 +158,8 @@ class FileService:
if file_record:
return FileInDB.model_validate(file_record)
return None
async def file_in_db_to_csv(self, db: Session, file: FileInDB) -> str:
"""Convert a file in the database to a CSV string"""
with open(file.path, "r") as f:
return f.read()