无法在 GridFS 中保存多个文档(使用 MongoMapper/Joint)

发布于 2024-12-14 00:50:50 字数 398 浏览 5 评论 0原文

我编写了一个 Padrino 应用程序,允许您上传文件。它使用 MongoMapper(通过 Joint)将这些文件(图像)存储在 GridFS 中。我能够毫无问题地存储一个文件。但是,当我去存储另一个文件时,它会保存,但它不在数据库中。我编写了直接使用模型类的规范(无需通过 Padrino 路线),并且得到了相同的结果。我在这里做错了什么?

相关文件要点: https://gist.github.com/1341836

应用程序:http://github.com/eturk/fhsclock

I've written a Padrino application that allows you to upload files. It uses MongoMapper (via Joint) to store these files (images) in GridFS. I am able to store one file with no problems. However, when I go to store another file, it saves, but it is not in the database. I wrote specs to use the model class directly (without going through Padrino routes) and I get the same result. What am I doing wrong here?

Gist with related files: https://gist.github.com/1341836

The application: http://github.com/eturk/fhsclock

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

热鲨 2024-12-21 00:50:50

我在 Firefox(而不是 Chrome)中尝试过,它成功了。清除了 Chrome 中的 cookie 和缓存,它起作用了。哎哟!

I tried it in Firefox (instead of Chrome), and it worked. Cleared my cookies and cache in Chrome and it worked. Doh!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文