move file from one folder to another in aws s3 nodejs
var AWS = require('aws-sdk');
AWS.config.update({
accessKeyId: 'xxx',
secretAccessKey: 'xxx'
});
var s3 = new AWS.S3();
var params = {
Bucket : 'bucketname', /* Another bucket working fine */
CopySource : 'bucketname/externall/1.txt', /* required */
Key : "1.txt", /* required */
ACL : 'public-read',
};
s3.copyObject(params, function(err, data) {
if (err)
console.log(err, err); // an error occurred
else {
console.log(data); // successful response
}
});
Also in JavaScript:
- kill all node process ubunut
- import jquery into angular 8
- get page link angular
- how to print numbers in javascript
- limitar la cantidad de decimales en javascript
- jquery select2 multiple select all
- logical operators javascript
- toastify js
- react native text area form
- electron download
- js method string remove extra spaces
- uppy init
- javascript for eac loop
- jquery add text to textbox
- orm for postgres node js
- const js +=
- backgroundImage react
- jquery script url
- jquery child element
- transaction commit rollback nodejs
- discord function promise
- jquery fadein
- too many open files react native
- date picker type react