๐ Bug Report: Server sdk for node deleteFile api delete storage bucket instead of file.
usamashafiqs opened this issue ยท 2 comments
usamashafiqs commented
๐ 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?
- I have read the Code of Conduct
joeyouss commented
Hi ๐๐ป Thanks for reporting, I'll discuss with the team to come up with a solution. I'll keep you posted
stnguyen90 commented
Closing as this has been addressed in Appwrite so that the API call doesn't get matched to the bucket endpoint.