Meteor-cfs-gridFS不能正常工作的生产服务器,但在本地服务器上工作正常

时间:2016-12-06 07:34:07

标签: meteor gridfs collectionfs

我在使用CollectionFS / GridFs软件包将图像上传到meteorJs应用程序时遇到问题。该应用程序在我的本地主机上的图像上传工作正常,但当我部署到生产服务器并尝试上传图像时,我得到一个损坏的图像,当我访问图像网址时,我收到此错误

Error in method "/cfs/files/:value/:value/", Error: TypeError: Cannot read property 'Images' of undefined
at Object.httpGetHandler (packages/cfs_access-point/packages/cfs_access-point.js:357:1)
at Object.accessPoint.get (packages/cfs_access-point/packages/cfs_access-point.js:675:1)
at packages/cfs_http-methods/http.methods.server.api.js:581:1

我尝试了多种解决方案,例如删除数据库,甚至删除和创建新服务器,但结果仍然相同。

我正在使用这些包

cfs:standard-packages cfs:gridfs

更新 代码段

`//collection
postImages = new FS.Collection("postimages", {
stores: [new FS.Store.GridFS("postimages", {})]
});
//permissions
postImages.allow({
  insert: function(userId, doc){return true;},
  download: function(userId){return true;}
});`

有关如何解决此问题的任何建议?

由于

0 个答案:

没有答案
相关问题