帕德里诺+ MongoMapper/关节问题
我正在 Padrino 上使用 MongoMapper 和 Joint,并尝试获取 上传工作。但是,我总是遇到
NoMethodError “#
。好像是这样 看不到路径,但是参数没问题。问题是什么 在这里?的未定义方法“路径””
代码要点: https://gist.github.com/1323998
我能够得到它不是错误,但是当我用 mongofiles
查找文件时,我找不到。对于rack/grid-fs 也是如此。联合储蓄在哪里?它到底有储蓄吗?
I'm using MongoMapper with Joint on Padrino, and trying to get the
upload working. However, I keep getting thrown aNoMethodError
. It seems like it
"undefined method 'path' for #<Hash:0xa6fbdf0>"
can't see the path, but the parameters are okay. What is the problem
here?
Gist with the code: https://gist.github.com/1323998
I was able to get it to not error, but when I go to find the file with mongofiles
, I can't find. The same goes for rack/grid-fs. Where is Joint saving to, and is it saving at all?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请参阅上面我的评论:
这是我对您需要做什么的想法,我认为您需要修改参数,以便 params[:background][:file] 是 tempfile 对象,如下所示:
我不是 100% 确定这个,但如果这不起作用,我可以设置一个快速的 Padrino 应用程序并进行测试。
See my comments above:
Here's my thought on what you need to do, I think you need to modify the params so that params[:background][:file] is the tempfile object, like so:
I'm not 100% sure on this, but if this doen't work I could setup a quick Padrino app and test.