How to remove a file in S3 Bucket with knox?

120 views Asked by At

I need to remove a file in S3 Bucket with Knox library.

I found some examples that explain how to upload a file but I was not able to find any examples that explain how to remove a file.

Can you provide me with an example code?

Thanks.

1

There are 1 answers

0
Piyush Patil On BEST ANSWER

Here is a sample code. More reference you can refer KNOX

client.del('/test/Readme.md').on('response', function(res){
  console.log(res.statusCode);
  console.log(res.headers);
}).end();