Can I write to a particular path in the S3 bucket?* *
*I am able to write to the root. *


Thanks
Kevin


On Friday, May 4, 2012 9:11:54 PM UTC-4, chilts 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

Reply via email to