rayyanmaq1
07/31/2021, 10:30 AMmilestones95
07/31/2021, 11:01 AMVinzent
07/31/2021, 11:29 AMHal
07/31/2021, 11:59 AMSQL
create table public.file_versions (
id uuid default uuid_generate_v1() primary key,
name text,
created_at timestamp with time zone DEFAULT timezone('utc' :: text, now()) NOT NULL,
updated_at timestamp with time zone DEFAULT timezone('utc' :: text, now()) NOT NULL
);
Then I insert a row in table editor, it gave me this error.Hal
07/31/2021, 12:46 PMspecs
bucket will get new row violates row-level security policy for table "objects"
2. I got application/json
as an image's content type after uploading a file from blob. Core code is below.
js
// imageData is Uint8Array
const blob = new Blob([imageData], {
type: 'image/png'
})
const fileExt = fileName.split('.').pop()
const uniqueName = `${uuid()}.${fileExt}`
const { data, error } = await supabase.storage
.from('heron')
.upload(uniqueName, blob, {
contentType: 'image/png'
})
silentworks
07/31/2021, 1:03 PMuuid_generate_v1()
before but I do know that uuid_generate_v4()
workssilentworks
07/31/2021, 1:06 PMtest12
07/31/2021, 1:14 PMtest12
07/31/2021, 1:14 PMHal
07/31/2021, 1:34 PMHal
07/31/2021, 1:35 PMRod
07/31/2021, 1:55 PMenBonnet
07/31/2021, 2:06 PMmilestones95
07/31/2021, 2:11 PMAzura
07/31/2021, 2:21 PMSucipto
07/31/2021, 2:33 PMconst { user, error } = await supabase.auth.update({
data: { hello: 'world' }
})
Rod
07/31/2021, 2:40 PMScott P
07/31/2021, 2:49 PMSubh
07/31/2021, 2:51 PMmilestones95
07/31/2021, 2:59 PMMiguel2390d
07/31/2021, 3:05 PMHal
07/31/2021, 3:06 PMmilestones95
07/31/2021, 3:06 PMHal
07/31/2021, 3:13 PMsql
-- create function called update_updated_at
CREATE OR REPLACE FUNCTION public.update_updated_at()
RETURNS TRIGGER AS $$
BEGIN
NEW.updated_at = TIMEZONE('utc' :: TEXT, NOW());
RETURN NEW;
END;
$$ LANGUAGE plpgsql SECURITY DEFINER;
-- add trigger for projects table
CREATE TRIGGER trigger_projects_updated_at
BEFORE UPDATE ON public.projects
FOR EACH ROW
EXECUTE PROCEDURE public.update_updated_at();
-- add trigger for users table
CREATE TRIGGER trigger_users_updated_at
BEFORE UPDATE ON public.users
FOR EACH ROW
EXECUTE PROCEDURE public.update_updated_at();
Robert
07/31/2021, 3:15 PMScott P
07/31/2021, 3:18 PMAzura
07/31/2021, 3:18 PMsilentworks
07/31/2021, 4:02 PMInternet Loser
07/31/2021, 4:25 PMRobert
07/31/2021, 4:47 PM