amazon-web-servicesamazon-s3knox-amazon-s3-client

How to remove a file in S3 Bucket with knox?


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.


Solution

  • 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();