Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以使用 ruby mongo 驱动程序列出给定 GridFS 目录中的所有文件?我搜索了文档并没有找到任何令人满意的东西。更重要的是,我也找不到任何按元数据搜索文件的方法。我检查了 java 驱动程序的文档,这两个功能都可以使用 GridFS 类开箱即用。
此致,
米哈乌
grid = Mongo::Grid.new(Mongoid.database) files = grid.instance_variable_get :@files files.find("filename" => "uploads/143-normal_regular2.jpg").as_json # files.remove - deletes alle files
同样适用于块