"to stream uploaded files to Amazon S3" is misleading.

You're not streaming the file from the upload, you're writing the entire file 
to disc and then uploading it to S3. I would assume a "streaming" library would 
stream the actual input.

-Mikeal

On May 4, 2012, at May 4, 20126:11 PM, Andrew Chilton wrote:

> Hi everyone,
> 
> You've asked for it, now you've got it. Middleware to stream all
> uploaded files to Amazon S3. Yay!
> 
> * npm install connect-stream-s3
> * http://search.npmjs.org/#/connect-stream-s3
> * https://github.com/appsattic/connect-stream-s3
> 
> To use it, just add your middleware *after* the express.bodyParser().
> Since this has already saved files on disk, we'll open them as streams
> to upload to S3 (can upload many files concurrently, you just set the
> number appropriate to your application):
> 
> app.use(connectStreamS3({
>    accessKeyId     : process.env.ACCESS_KEY_ID,
>    secretAccessKey : process.env.SECRET_ACCESS_KEY,
>    awsAccountId    : process.env.AWS_ACCOUNT_ID,
>    region          : amazon.US_EAST_1,
>    bucketName      : 'my-bucket-name',
>    concurrency     : 2, // default: 3
> });
> 
> Why is this good ... well it means that before you say to your user
> "File upload successful" you have already uploaded it to a service
> which guarantees 99.9999% reliability. If you don't do that, it's on
> disk right, but your server may crap out and you lose info. Makes
> sense? :)
> 
> Powered by AwsSum.
> 
> Have fun and happy hacking,
> Andy
> 
> -- 
> Andrew Chilton
> e: [email protected]
> w: http://www.appsattic.com/
> 
> -- 
> Job Board: http://jobs.nodejs.org/
> Posting guidelines: 
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to