Spaces:
Running
Running
# import os | |
# from typing import Dict | |
# from fastapi import UploadFile | |
# from app.db_local_storage.files_db import FILES_DIRECTORY, FILES_NAMES_DATABASE | |
# from app.db_local_storage.documents_db import documents_db | |
# class UploadDocumentFeature: | |
# @staticmethod | |
# async def uploadFile(document: UploadFile) -> Dict[str, str]: | |
# """ | |
# Upload a file to the server | |
# :param document: the file to upload | |
# :return: a message to confirm the upload | |
# """ | |
# data = { | |
# "id": len(documents_db) + 1, | |
# "filename": document.filename, | |
# } | |
# documents_db.append(data) | |
# return {"message": "Document Updated"} | |