1
在/Project/lib
文件夾中,我首先聲明一個FS.Store.GridFS:在流星,形象收集在FS.Store.GridFS transformWrite功能未定義
imageStore = new FS.Store.GridFS("images", {
transformWrite: function(file, readStream, writeStream){
if (something) {...}
else {
Images.remove({_id: file._id});
}
}
}
然後我聲明圖像採集:
Images = new FS.Collection("images", {
stores: imageStore
});
然而,在編譯時,我得到的錯誤:
=> Exited with code: 8
...
W20150623-13:06:51.855(-4)? (STDERR) throw(ex);
W20150623-13:06:51.855(-4)? (STDERR) ^
W20150623-13:06:51.855(-4)? (STDERR) ReferenceError: Images is not defined
...
我試圖把Images聲明中的imageStore聲明沒有成功。
但是重要的是,這不僅是Images
,它是由於未定義導致錯誤。如果我包含任何變量名,它在該else
語句中似乎是未定義的。
最重要的是,確切的代碼適用於我的朋友... 任何幫助將不勝感激。
謝謝,這個伎倆。 – forallepsilon