sanity-plugin-media-library
sanity-plugin-media-library copied to clipboard
Error Message when deleting an image from the library
I have a problem, where I cant delete the pictures I've uploaded.
Reproduce the Error:
From Dashboard
- Go to "Media Library"
- Select an image
- Click on "delete"
Error: o: the mutation(s) failed: Insufficient permissions; permission "update" required
Screenshots:


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"
}
]
}
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?
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?
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
I'm experiencing the exact same as described by @treb0r
https://github.com/Aratramba/sanity-plugin-media-library/issues/42#issuecomment-1339087405