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. #5310

Closed
2 tasks done
usamashafiqs opened this issue Mar 31, 2023 · 4 comments · Fixed by utopia-php/http#92 or utopia-php/http#96
Assignees
Labels
bug Something isn't working product / storage Fixes and upgrades for the Appwrite Storage.
Milestone

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

Version 1.2.x

💻 Operating system

Linux

🧱 Your Environment

No response

👀 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 Mar 31, 2023
@probablyArth
Copy link

you should probably raise this issue on sdk-generator or sdk-node

@freefreeP
Copy link

freefreeP commented Mar 31, 2023

Hi all this is my first contribution/PR,

I have worked on this and raised a PR. Please review the PR.

Thank you

@joeyouss
Copy link

joeyouss commented Apr 3, 2023

Hi @freefreeP , thank you for raising the PR, our team will review it soon!

@stnguyen90 stnguyen90 linked a pull request May 11, 2023 that will close this issue
@stnguyen90
Copy link
Contributor

Btw, this is a problem in utopia-php framework due to how were matching routes. This PR should fix this problem: utopia-php/http#92

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working product / storage Fixes and upgrades for the Appwrite Storage.
Projects
None yet
6 participants