javascript – 当我在Amazon S3中将Quiet设置为true以在deleteObjects()方法中启用安静模式时会发生什么?
作者:互联网
我在Node.js中使用Amazon S3,我想从存储桶中删除一个或多个文件.我想知道当我将Quiet参数设置为true时会发生什么.
var params = {
Bucket: 'STRING_VALUE', /* required */
Delete: { /* required */
Objects: [ /* required */
{
Key: 'STRING_VALUE', /* required */
VersionId: 'STRING_VALUE'
},
/* more items */
],
Quiet: true || false
},
MFA: 'STRING_VALUE'
};
s3.deleteObjects(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
我感谢任何帮助.
解决方法:
来自Amazon Docs:
静音模式:
Toggles between Quiet and Verbose mode for the operation. If set to
true (Quiet mode), the response includes only those keys for objects
on which the delete operation failed.
标签:javascript,node-js,amazon-web-services,amazon-s3,aws-sdk 来源: https://codeday.me/bug/20190824/1712326.html