quivr/backend/repository/files/list_files.py
Zineb El Bachiri be7acf052b
feat: get files from storage (#1205)
* 🌱 list files in storage & generate signed URL

*  add knowledge router

* 🗃️ add knowledge tables

*  add knowledge during upload

* 🚧 add knowledge a brain_knowledge models and repo

* 🔥 remove brain_knowledge

*  add upload to knowledge table

*  add crawl to knowledge table

* ✏️ fixes
2023-09-20 09:35:37 +02:00

18 lines
422 B
Python

from multiprocessing import get_logger
from models import get_supabase_client
from supabase.client import Client
logger = get_logger()
def list_files_from_storage(path):
supabase_client: Client = get_supabase_client()
try:
response = supabase_client.storage.from_("quivr").list(path)
logger.info("RESPONSE", response)
return response
except Exception as e:
logger.error(e)