MCPcopy Create free account
hub / github.com/awsdocs/aws-doc-sdk-examples / deletePhoto

Function deletePhoto

javascript/example_code/s3/s3_photoExample.js:188–196  ·  view source on GitHub ↗
(albumName, photoKey)

Source from the content-addressed store, hash-verified

186
187// snippet-start:[s3.JavaScript.photoAlbumExample.deletePhoto]
188function deletePhoto(albumName, photoKey) {
189 s3.deleteObject({ Key: photoKey }, function (err, data) {
190 if (err) {
191 return alert("There was an error deleting your photo: ", err.message);
192 }
193 alert("Successfully deleted photo.");
194 viewAlbum(albumName);
195 });
196}
197// snippet-end:[s3.JavaScript.photoAlbumExample.deletePhoto]
198
199// snippet-start:[s3.JavaScript.photoAlbumExample.deleteAlbum]

Callers

nothing calls this directly

Calls 2

viewAlbumFunction · 0.70
deleteObjectMethod · 0.45

Tested by

no test coverage detected