sanity-plugin-media-library icon indicating copy to clipboard operation
sanity-plugin-media-library copied to clipboard

Error Message when deleting an image from the library

Open mikepziegler opened this issue 2 years ago • 4 comments

I have a problem, where I cant delete the pictures I've uploaded.

Reproduce the Error:

From Dashboard

  1. Go to "Media Library"
  2. Select an image
  3. Click on "delete"

Error: o: the mutation(s) failed: Insufficient permissions; permission "update" required

Screenshots:

Bildschirmfoto 2022-08-30 um 21 00 26 image

Sanity.json:

{
  "root": true,
  "project": {
    "name": ""
  },
  "api": {
    "projectId": "",
    "dataset": ""
  },
  "plugins": [
    "@sanity/base",
    "@sanity/default-layout",
    "@sanity/default-login",
    "@sanity/desk-tool",
    "media-library"
  ],
  "env": {
    "development": {
      "plugins": [
        "@sanity/vision"
      ]
    }
  },
  "parts": [
    {
      "name": "part:@sanity/base/schema",
      "path": "./schemas/schema"
    }
  ]
}

mikepziegler avatar Aug 30 '22 19:08 mikepziegler

I also get this issue when trying to update fields like "Title", "Alt", etc from the media library. When inspecting the request I see that it doesn't include the auth token in the headers. This is running on localhost so maybe that's got something to do with it?

matt-sanders avatar Sep 12 '22 21:09 matt-sanders

I am having the same problem. I imported a dataset that uses sanity-media-library into a new project. All of the media is there, including alt tags etc but I cannot edit add, or update them without seeing the following error: clientError: Mutations failed with 1 error(s). I have hundred of images in there and I'm really stuck with this. How can I debug?

treb0r avatar Dec 06 '22 10:12 treb0r

tbh I don't know why this happens. Does it work when you change from this plugin to the media-browser plugin? https://www.sanity.io/plugins/sanity-plugin-media

Aratramba avatar Dec 06 '22 12:12 Aratramba

I'm experiencing the exact same as described by @treb0r

https://github.com/Aratramba/sanity-plugin-media-library/issues/42#issuecomment-1339087405

jimmi-joensson avatar Jan 10 '23 18:01 jimmi-joensson