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

mp3 file is not being deleted #658

Closed
ritikRidingad opened this issue Apr 2, 2024 · 1 comment
Closed

mp3 file is not being deleted #658

ritikRidingad opened this issue Apr 2, 2024 · 1 comment

Comments

@ritikRidingad
Copy link

Bug report for Cloudinary NPM SDK

Before proceeding, please update to latest version and test if the issue persists

Describe the bug in a sentence or two.

mp3 file is not being deleted after sending the correct public_id and after hiting the api am getting { result: 'not found'} in my cosnole while my file is still exists in cloudinary

 const song = await Song.findById(req.params.id)
        if (song.songs.public_id && song.songs.url) {
            cloudinary.v2.uploader.destroy(song.songs.public_id)
                .then(deleted => {
                    console.log('deleted', deleted);
                })
                .catch(error => {
                    console.error('error', error);
                });
        }

Issue Type (Can be multiple)

[ ] Build - Can’t install or import the SDK
[ ] Babel - Babel errors or cross browser issues
[ ] Performance - Performance issues
[ ] Behaviour - Functions aren’t working as expected (Such as generate URL)
[ ] Documentation - Inconsistency between the docs and behaviour
[ ] Incorrect Types - For typescript users who are having problems with our d.ts files
[ ] Other (Specify)

Steps to reproduce

… if applicable

Error screenshots

… if applicable

Browsers (if issue relates to UI, else ignore)

[ ] Chrome
[ ] Firefox
[ ] Safari
[ ] Other (Specify)
[ ] All

Versions and Libraries (fill in the version numbers)

Cloudinary_NPM SDK version
Node - 0.0.0
NPM - 0.0.0

Config Files (Please paste the following files if possible)

Package.json

Repository

If possible, please provide a link to a reproducible repository that showcases the problem

@Vdeub-cloudinary
Copy link

Hi @ritikRidingad,
Audio files are of video types as documented here so you need to add the resource_type parameter and set it to video in your destroy call.

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