Skip to content

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

Closed

Description

@usamashafiqs

👟 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?

Activity

  1. added
    bug
    on Mar 31, 2023
  2. probablyArth commented on Mar 31, 2023

    @probablyArth

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

  3. freefreeP commented on Mar 31, 2023

    @freefreeP

    Hi all this is my first contribution/PR,

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

    Thank you

  4. joeyouss commented on Apr 3, 2023

    @joeyouss

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

  5. linked a pull request that will close this issuefeat: routing v2 #92on May 11, 2023
  6. stnguyen90 commented on May 11, 2023

    @stnguyen90
    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

  7. added this to the 1.3.5 milestone on May 30, 2023
  8. added
    product / storage
    on May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugproduct / storage

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions