Chubbyman
07/21/2022, 2:24 AMstorage3.utils.StorageException: {'statusCode': 400, 'error': 'Key is not present in table "buckets".', 'message': 'insert or update on table "objects" violates foreign key constraint "objects_bucketId_fkey"'}
I made sure to create all the necessary object policies to allow for insertion, as well as make the bucket itself public. Here is my code:
py
from supabase import create_client
from dotenv import load_dotenv
import os
load_dotenv()
url = os.environ.get("DEPLOY_URL")
key = os.environ.get("DEPLOY_KEY")
supabase = create_client(url, key)
file = "test.txt"
# data = supabase.storage().from_("public/training-data").download("test.txt")
# print(data)
supabase.storage().from_("public/training-data").upload("test.txt", file)
If anyone has any suggestions, please let me know.