Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to delete raw file #681

Closed
ehtshamaziz opened this issue Aug 2, 2024 · 2 comments
Closed

Unable to delete raw file #681

ehtshamaziz opened this issue Aug 2, 2024 · 2 comments

Comments

@ehtshamaziz
Copy link

Public Id: 65b6a4feda9bcf834d99ae28

    // Delete the file from Cloudinary
    const result = await cloudinary.uploader.destroy(publicId, { resource_type: "raw" })
    console.log("Cloudinary delete result:", result);

I am unable to delete file from cloudinary, it gives me result not found error.

@tommyg-cld
Copy link
Contributor

@ehtshamaziz with raw files, the file extension is part of the public_id so you need to include it in your API call.

e.g.
const result = await cloudinary.uploader.destroy("65b6a4feda9bcf834d99ae28.json", { resource_type: "raw" }) console.log("Cloudinary delete result:", result);

hope this helps.

@ehtshamaziz
Copy link
Author

@ehtshamaziz with raw files, the file extension is part of the public_id so you need to include it in your API call.

e.g. const result = await cloudinary.uploader.destroy("65b6a4feda9bcf834d99ae28.json", { resource_type: "raw" }) console.log("Cloudinary delete result:", result);

hope this helps.

@ehtshamaziz with raw files, the file extension is part of the public_id so you need to include it in your API call.

e.g. const result = await cloudinary.uploader.destroy("65b6a4feda9bcf834d99ae28.json", { resource_type: "raw" }) console.log("Cloudinary delete result:", result);

hope this helps.

Thankyou, It worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants