s3快取
启用使用本地缓存从Amazon S3存储桶读取文件
例子
var s3Cache = require ( 'amazon-s3-cache' ) ;
s3Cache . configureAWS ( {
region : 'us-west-2'
} ) ;
s3Cache . configureCacheDir ( '/' ) ;
s3Cache . getFile ( 'bucket' , 'key' )
. on ( 'error' , function ( error ) {
console . log ( 'ERROR' ) ;
console . log ( error ) ;
} )
. on ( 'success' , function ( filePath ) {
console . log ( 'SUCCESS' ) ;
1