如何将towerjs资产上传到S3?

时间:2012-07-19 09:59:46

标签: towerjs

在towerjs中将生产资产上传到S3的正确方法是什么? 我在config / credentials.coffee中配置了我的S3凭证

然后我尝试蛋糕资产:发布

并获取

        /Users/avaranovich/projects/demos/node/firstApp/Cakefile:15
    client = knox.createClient(Tower.secrets.s3);
                                            ^
TypeError: Cannot read property 's3' of undefined
    at Object._this [as action] (/Users/avaranovich/projects/demos/node/firstApp/Cakefile:15:45)
    at helpers.extend.invoke (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:42:26)
    at Object.action (/Users/avaranovich/projects/demos/node/firstApp/Cakefile:9:12)
    at helpers.extend.invoke (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:42:26)
    at Object.exports.run (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:67:21)
    at Object.<anonymous> (/usr/local/lib/node_modules/coffee-script/bin/cake:7:38)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)

更新:我发现任务资产中的右边:上传:s3 应该看起来 client = knox.createClient Tower.config.credentials.s3

但后来又出现了另一个错误

/Users/avaranovich/projects/demos/node/firstApp/node_modules/tower/lib/tower/server/application/assets.js:112
    _console.debug("Uploading to " + Tower.secrets.s3.bucket);
                                                  ^
TypeError: Cannot read property 's3' of undefined
    at Object.Tower.Application.Assets.upload (/Users/avaranovich/projects/demos/node/firstApp/node_modules/tower/lib/tower/server/application/assets.js:112:51)
    at Object._this [as action] (/Users/avaranovich/projects/demos/node/firstApp/Cakefile:16:37)

看起来像Tower.secrets.s3.bucket在其他地方硬编码。

谢谢, 安德烈

1 个答案:

答案 0 :(得分:2)

我会紧紧抓住,密切关注开发部门,甚至开始按照自述文件中所述的要求做出贡献:https://github.com/viatropos/tower/tree/development

他们终于处于开发分支的“功能完整”阶段,现在正在努力支持它,以便解决错误并提高性能。

请务必每天观看快速变化的路线图:https://github.com/viatropos/tower/blob/master/ROADMAP.md

鉴于开发人员数量有限,以相当令人印象深刻的速度前进!我们需要为这个项目付出沉重的代价。