Getting Started
Why stream?
Installation
npm
npm i @bottlenose/rxs3 --saveyarn
yarn add @bottlenose/rxs3Stream file uploads!
Last updated
npm i @bottlenose/rxs3 --saveyarn add @bottlenose/rxs3Last updated
import { from } from 'rxjs';
import { upload } from '@bottlenose/rxs3';
// create file chunks to upload
const csvRow$ = from([
'Name,Occupation\n',
'Blackbeard,Pirate\n',
'Captain Hook,Pirate\n',
'Aladdin,Thief\n',
]);
// describe calculations
const upload$ = csvRow$.pipe(
upload({
s3Bucket: 'mys3bucket',
s3Key: './scurvy-dogs.csv',
contentType: 'text/csv',
})
);
// run the pipeline and do something with the results
upload$.subscribe(null, null, () => console.log('done'));
// done!