{
  "id": 17707348,
  "title": "Supabase Storage upload fails with \"new row violates row-level security policy\"? Here's the fix",
  "url": "https://urgent.news/2026/11/02/supabase-storage-upload-fails-with-new-row-violates-row-level",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-02T00:06:52.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/ahmed_hassanyaseen_1b7ab/supabase-storage-upload-fails-with-new-row-violates-row-level-security-policy-heres-the-fix-4aec"
  },
  "original_language": "en",
  "account": "Supabase Storage uploads fail due to row-level security (RLS) policies. The error message is \"new row violates row-level security policy.\" StorageApiError appears when the app tries to upload a file and the request is rejected. The fix involves creating INSERT policies for the storage.objects table, scoped to the user's own folder. These policies ensure the upload passes upsert: true, and a SELECT policy allows the app to read the user's own files.",
  "summary": "Your app tries to upload a file to Supabase Storage, and the request fails with one of these: new row violates row-level security policy StorageApiError: new row violates row-level security policy Unauthorized Supabase Storage refuses every upload until the storage.objects table has policies that allow it. The fix: add an INSERT policy for the bucket, scoped to the user's own folder, and add…",
  "key_points": [
    "Supabase Storage uploads fail due to row-level security (RLS) policies.",
    "Error message \"new row violates row-level security policy\" appears when upload request is rejected.",
    "Fix involves creating INSERT policies for storage.objects table, scoped to user's own folder."
  ],
  "editors_take": "Configuring specific insert and select policies for the storage objects table transforms restrictive security errors into a functional permission system that protects user data while enabling successful file uploads.",
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}