2

I want to delete files and folder from the Amazon s3 bucket. Below is my request, but its not working.

     $.ajax({ 
         type: "POST",
         dataType: "jsonp",

         url: "http://s3.amazonaws.com/bucketname/",
          beforeSend: function( xhr ) {
            xhr.setRequestHeader('Action','DELETE');
            xhr.setRequestHeader('AWSAccessKeyId','AWSAccessKeyId');
            xhr.setRequestHeader('signature','signature');
            xhr.overrideMimeType( "application/octet-stream" );
         },
          success: function(data){  alert("IN SUCCESS"); alert(data);  },
          error: function(data) {  alert(data);}

     });
Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
prajakta
  • 21
  • 2
  • Not sure if your use case is what I think it is, but is your signature really set to the string 'signature'. Perhaps have a look at this page: http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAPI.html, and this page: http://docs.aws.amazon.com/AmazonS3/latest/dev/S3_Authentication2.html – user1417684 Oct 06 '13 at 02:17
  • Did you ever get this working? – Petah Jan 26 '15 at 21:10

0 Answers0