Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

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
    }
});
Comment

PREVIOUS NEXT
Code Example
Javascript :: xhr 
Javascript :: only allow numbers in text input in js 
Javascript :: js tab active 
Javascript :: bash commands in node 
Javascript :: usenavigate react router dom v6 
Javascript :: how to run a function when the window is closing javascript 
Javascript :: for of with index 
Javascript :: ant design not working in react js 
Javascript :: convert object to array javascript 
Javascript :: how to get datetime in nodejs 
Javascript :: refresh page on div click 
Javascript :: javascript string contains multiple substrings 
Javascript :: assign an element value as key in array of objects 
Javascript :: sort array of objects javascript by date 
Javascript :: javascript remove character from string 
Javascript :: javascript sort array strings alphabetically 
Javascript :: jquery remove items from dropdownlist 
Javascript :: Read text file in vanilla JS 
Javascript :: fs.writefilesync in nodejs 
Javascript :: javascript json parse 
Javascript :: js string length 
Javascript :: angular right click 
Javascript :: is_int js 
Javascript :: express get host url 
Javascript :: change value of drop down using jquery 
Javascript :: vue v-for object 
Javascript :: nodejs current timestamp unix 
Javascript :: how to get the max value of two variables in math 
Javascript :: change html using jquery 
Javascript :: unable to open file in target xcode react native 
ADD CONTENT
Topic
Content
Source link
Name
5+5 =