Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

node download s3 file

const AWS = require('aws-sdk');
AWS.config.update(
  {
    accessKeyId: "....",
    secretAccessKey: "...",
    region: 'ap-southeast-1'
  }
);
const s3 = new AWS.S3();
const options = {
  Bucket    : '/bucket-url',
  Key    : fileKey,
};
const fileStream = s3.getObject(options).createReadStream();
fileStream.pipe(res);
Comment

PREVIOUS NEXT
Code Example
Javascript :: or in js 
Javascript :: mask date of birth/ dob in javascript 
Javascript :: javascript log error without traceback 
Javascript :: lip. dips *dipped. also mm bpi. -opp. -ditty 
Javascript :: jquery to another page 
Javascript :: downgrade react version to 17 
Javascript :: vscode file cannot be loaded because running scripts is disabled on this system 
Javascript :: javascript format date yyyy-mm-dd 
Javascript :: almostIncreasingSequence js 
Javascript :: javascript to convert rgb to hsl 
Javascript :: add formdata to axios request in js 
Javascript :: event listener for element lost focus 
Javascript :: Javascript - check if div contains a word? - Stack Overflow 
Javascript :: fetch post data 
Javascript :: file name without extension javascript 
Javascript :: js remove spaces 
Javascript :: react lottie player on hover 
Javascript :: how to check if a string is correctly encoded as base64 in javascript 
Javascript :: node.js return json 
Javascript :: access url query string from javascript 
Javascript :: mongoose connection 
Javascript :: id of other schema type mongoose 
Javascript :: counting duplicates codewars javascript 
Javascript :: nuxt small scroll 
Javascript :: big numbers factorial js 
Javascript :: js to json 
Javascript :: sorting number with coma datatable 
Javascript :: JS not executing 
Javascript :: add element to array using splice 
Javascript :: javascript check date greater than today 
ADD CONTENT
Topic
Content
Source link
Name
2+4 =