mirror of
https://github.com/strapi/strapi.git
synced 2025-11-12 16:22:10 +00:00
Fixes Cloudinary upload plugin "delete" method
This commit is contained in:
parent
0f6d597b8c
commit
78b85e734c
@ -46,6 +46,10 @@
|
|||||||
"configurable": false,
|
"configurable": false,
|
||||||
"required": true
|
"required": true
|
||||||
},
|
},
|
||||||
|
"public_id": {
|
||||||
|
"type": "string",
|
||||||
|
"configurable": false
|
||||||
|
},
|
||||||
"related": {
|
"related": {
|
||||||
"collection": "*",
|
"collection": "*",
|
||||||
"filter": "field",
|
"filter": "field",
|
||||||
|
|||||||
@ -50,7 +50,7 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
async delete (file) {
|
async delete (file) {
|
||||||
try {
|
try {
|
||||||
const response = await cloudinary.uploader.destroy(file.public_id + '3', {
|
const response = await cloudinary.uploader.destroy(file.public_id, {
|
||||||
invalidate: true
|
invalidate: true
|
||||||
});
|
});
|
||||||
if (response.result !== 'ok') {
|
if (response.result !== 'ok') {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user