jar
12/25/2022, 2:56 PMMozes
12/25/2022, 3:53 PMchit
12/25/2022, 5:01 PMconst { data, error } = await supabase.auth.signUp(
{
email: 'example@email.com',
password: 'example-password',
options: {
data: {
first_name: 'John',
age: 27,
}
}
}
)
may I ask how may the additional metadata be recorded and stored? is it in the column raw_user_meta_data
inside the auth users table?VWL Tobias Hassebrock
12/25/2022, 5:09 PMPierre_
12/25/2022, 7:54 PMdocuments
table with some row level security policies set for select
and update
actions. A document can be editable, readonly, or neither, based on these policies.
The document editor on the client must be configured as being either editable
or readonly
. Is it possible to check from the client if the user is allowed to select
or update
the document by these policies, given the user_id
and the document_id
?
Thanks,Hermes
12/25/2022, 10:49 PMIl
12/25/2022, 11:04 PMjarryd
12/26/2022, 3:07 AMbrianhv
12/26/2022, 4:15 AMCrownie
12/26/2022, 5:05 AMjs
const formdata = await new Promise((res, rej) => {
const form = new Formidable({ multiples: true });
form.parse(req, (err, fields, files) => {
if (err) {
rej({ err });
}
const daunt = files.image;
console.log({ daunt });
res({ err, fields, files });
});
});
const formData = formdata as any;
const { title, description } = formData.fields as formidable.;
const postImage = formData.files.image as formidable.File;
const imageCompressed = await sharp(postImage.filepath)
.toFormat("png", { palette: true })
.png({ quality: 8 })
.toBuffer();
const ress = await supabase.storage
.from("post-images")
.upload(Math.random().toString() + ".png", imageCompressed, { upsert: false });
This is on `/api `folder of nextjs but when the file is uploaded it is type of text/plain;charset=UTF-8 - 157 bytes
not png
,
is there a documentation i can explore on this?mukhtharcm
12/26/2022, 6:23 AMGnarusly
12/26/2022, 7:31 AMFlorian
12/26/2022, 8:29 AMsignInWithOtp
+ verifyOtp
and the first OTP I'm getting is almost always expired. The second one works.sven
12/26/2022, 11:05 AMError: Remote database Postgres version 15 is incompatible with db.major_version 14. If you are setting up a fresh Supabase CLI project, try changing db.major_version in supabase/config.toml to 15.
Try rerunning the command with --debug to troubleshoot the error.
If I change my db.major_version in supabase/config.toml to 15, i get following error
Error: Failed reading config: Invalid db.major_version: 15.
Try rerunning the command with --debug to troubleshoot the error.
My local version is: PostgreSQL 14.5
My remote db version is: PostgreSQL 15.1
How can I update my local version to PostgreSQL 15.1?chit
12/26/2022, 11:05 AMawait supabase.rpc('hello_world')
But there are also some security definer
functions that I don't want user to call
Are users not able to call security definer functions?
or what steps can I take to prevent them from being able to call those functions?Chirag
12/26/2022, 11:41 AMchrister
12/26/2022, 1:08 PMconst { data: { user } } = await supabase.auth.getUser()
const form = reactive({
data: {
first_name: '',
last_name: '',
country: '',
city: '',
address_line: '',
postal_code: '',
username: '',
email: '',
currency: '',
language: '',
},
});
if (user && user.id) {
const getAccount = async () => {
const { data: account, error } = await supabase
.from('accounts')
.select()
.eq("user_id", user.id)
return { account, error };
};
const { account, error } = await getAccount();
console.log(account)
form.data.first_name=account[0].first_name
console.log(error)
}
R4Y
12/26/2022, 1:40 PMUberzeek
12/26/2022, 4:21 PMOrange🍊
12/26/2022, 4:51 PMemail@provider.com | email+1@provider.com | ...
What is the best way using Supabase?toddgeist
12/26/2022, 5:35 PMdraco
12/26/2022, 5:36 PMRevaycolizer
12/26/2022, 7:23 PMJulian IncrEdelman
12/26/2022, 8:17 PMGuy Rozen
12/26/2022, 9:10 PMDDupasquier
12/26/2022, 9:31 PMjs
const getElement = async () => {
const { data: url } = supabase.storage.from('svg-assets').getPublicUrl(element.elementName);
return url;
};
let image: { publicUrl: string };
let loading = true;
$: console.log(image, element.elementName)
onMount(async () => {
image = await getElement();
setTimeout(() => {
loading = false;
}, 1000);
});
Here is the output of that console log:
{publicUrl: 'https://latdcbfvbassfihdwpwi.supabase.co/storage/v1/object/public/svg-assets/totoro_umbrella'} 'totoro_umbrella'
'https://latdcbfvbassfihdwpwi.supabase.co/storage/v1/object/public/svg-assets/totoro_umbrella'} 'moon_loader'
As you can see, the getElement function isn't always grabbing the correct asset, even though my 'element.elementName' is always correct no matter what. Which leads me to believe that this is an issue (or oversight) that I'm having with supabase.
Any insight is appreciated! Thanks!Tobias Grether
12/26/2022, 10:12 PMnkeating
12/26/2022, 10:37 PMChk
12/26/2022, 11:06 PMiStun4Fun
12/27/2022, 12:05 AM