Upload to public storage - Invalid JWT

Hey there I created a simple public bucket. When I trying to upload a file via:
const { data, error } = await supabase.storage
    .from("mybucket")
    .upload("public/avatar1.png", req.body.file);

Im getting this error response:
{
  statusCode: '401',
  error: 'Invalid JWT',
  message: 'new row violates row-level security policy for table "objects"'
}

Im not set any policies. My policies are totally empty.

[UPDATE]: I executed this SQL query:
-- 1. Allow public access to any files in the "public" bucket
create policy "Public Access"
on storage.objects for select
using ( bucket_id = 'mybucket' );

Still the same error :/

Some ideas what to do ?
Was this page helpful?