Skip to main content

DELETE IMAGE NODEJS "NOT FOUND"

Comments

5 comments

  • Raz Ziv

    Hi Leonardo,

    Upon checking our logs, I've noticed that in all of your destroy requests you also passed the `type` parameter with a value of `fetch`.
    This image's type is `upload`, which is also the default value when not passing the `type` parameter at all.
    In this case, you can either completely remove the `type` parameter from your request or change its value from `fetch` to `upload`.

    In addition, I've noticed that in some of your requests you've set the `public_id` as `id=bdjz83srawdkfvho45l1`, while you also had a minority of requests made with only the actual `public_id` of the asset - `bdjz83srawdkfvho45l1`.
    The correct syntax is indeed the asset's `public_id` value only, without the `id=` prefix. 

    Can you please try again while making sure the two points mentioned above are taken care of, then let me know if the destroy request is processed successfully?

    Thanks,
    Raz

    0
  • leonardo

    Thank Raz, now it work. 

     

    Regards!!!

    0
  • Raz Ziv

    My pleasure, Leonardo. Glad I could help :)

    Best,
    Raz

    0
  • bui duc
    delete_image:(url)=> {
            const options = {
                resource_type: "raw",
                invalidate: true,
                type:'upload'
            };

     

            const arrTempt = url.split('/');
            const fileName = arrTempt[arrTempt.length - 1];
            let publicId = fileName.split('.')[0];
            cloudinary.uploader.destroy(publicId,options, (error,result)=> {
            console.log(result, error) });
        },
    error { result: 'not found' } . Help me fix error.
    0
  • Francis Tagbo

    Hi Bui,

    Could you please create a support ticket for us thru https://support.cloudinary.com/hc/en-us/requests/new and share with us your cloud name and the public you are trying to delete so we could check it?

    Regards,
    Francis

    0

Post is closed for comments.