S3.delete does not delete file
S3.delete does not seem to delete the file when its relative path is used. The S3.delete function returns result with the value true in the callback.
Why isnt the file being deleted off S3? Thank you!
Original URL: https://my.Bucket.s3-ap-southeast-1.amazonaws.com/demo/89fd92d2-98ce-4af2-8e1f-87f213896027-avatar.jpg
Relative URL: /my.Bucket/demo/89fd92d2-98ce-4af2-8e1f-87f213896027-avatar.jpg
var S3ImagePath = "/my.Bucket/" + ( Meteor.user().profile.imageUrl.split("/").slice(3).join("/") )
console.log(S3ImagePath)
S3.delete( S3ImagePath, function(error, result) {
if(error)
console.log('error:', error)
else
console.log('result:', result)
I have defined S3.config on the server, but somehow I also noticed that using the wrong credentials doesn't throw any errors
S3.config = {
key: 'mykey',
secret: 'mysecret------/eYKWn9K+7v07IL',
bucket: 'my.Bucket'
};
I'll have a look as soon as I get a chance
Hi, there might be something wrong with the way you're calculating the path of the image. No one else has had this issue plus I tested it quite a bit to make sure I wasn't missing anything. What error message are you getting? Were you able to solve it?
hi! I have the same here. The S3.delete result returns true, but file is still on the server. Tried with (/file.jpg' and 'file.jpg' too and both have the result described.
Hi! I have the same here, Result returns true, but file is not deleted.
Hey guys! I'm almost done with the new version of this package, in the new version I plan to remove the dependency on Knox. I'm not sure why some people are having this issue >_<