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

🐛 Bug Report: Server sdk for node deleteFile api delete storage bucket instead of file. #638

Closed
2 tasks done
usamashafiqs opened this issue Apr 3, 2023 · 2 comments
Closed
2 tasks done
Assignees
Labels
bug Something isn't working

Comments

@usamashafiqs
Copy link

👟 Reproduction steps

Server sdk for node deleteFile api delete storage bucket if file ID had empty string as parameter.
It should throw exception if file ID had empty string.

try {
    const res = await SDK.storage.deleteFile('BucketID', '');
    console.log(res);
} catch (e) {
    if (e instanceof AppwriteException) {
        console.log(e.message);
    }
    console.log(e);
}

👍 Expected behavior

It should throw exception if file ID had empty string provided instead of file ID.

👎 Actual Behavior

Server sdk for node deleteFile api delete storage bucket if file ID had empty string as parameter.

🎲 Appwrite version

Different version (specify in environment)

💻 Operating system

Linux

🧱 Your Environment

Appwrite version 1.2.1
node-appwrite version 8.2.0

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

@usamashafiqs usamashafiqs added the bug Something isn't working label Apr 3, 2023
@joeyouss joeyouss self-assigned this Apr 3, 2023
@joeyouss
Copy link

joeyouss commented Apr 3, 2023

Hi 👋🏻 Thanks for reporting, I'll discuss with the team to come up with a solution. I'll keep you posted

@stnguyen90
Copy link
Contributor

Closing as this has been addressed in Appwrite so that the API call doesn't get matched to the bucket endpoint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants