Skip to content

s3.del()

SaltwaterC edited this page Nov 16, 2011 · 2 revisions

About

Low level method for sending DELETE requests to the S3 REST API. The method is not called delete due to conflict with JavaScript itself that reserves the 'delete' keyword.

Reference

s3.del(path, callback)
  • 'path' - the S3 Path.
  • 'callback' - the callback that is executed when the processing finishes. It has a couple of arguments: error and result.
  • If there's an error, the callback receives the error argument as Error instance.
  • If the error argument is null, then the response argument contains the response.headers object as returned by the node.js core HTTPS client.

Due to the nature of the DELETE request, unless the client receives one of the HTTP Errors, the success of the operation is not confirmed by the S3 API.