Librarian S3 Storage
Note: This version of
librarian-s3-storage is compatible with
librarian 2.0.0 and above.
$ npm install librarian-s3-storage
var express =var librarian =var S3Storage =var storage =bucket: 'my-cool-bucket'prefix: 'uploads'accessKeyId: AWS_ACCESS_KEY_IDsecretAccessKey: AWS_SECRET_ACCESS_KEYvar app =appapp
This is your Amazon S3 access key. Make sure that your key set has permission to access S3.
This is your Amazon S3 secret access key.
This is the bucket name that your files will be uploaded to.
If you want to store file uploads in a bucket along side other files, adding a prefix will allow you to put all your uploads in a "folder". For example, a prefix of
uploads will allow you to also use the prefix
transfers for other things in the same project.
true, this option will create the bucket if it does not already exist. Defaults to