I’m using meteor 1.5. Everything works locally.
I have an /assets/plans directory that isn’t being packaged up in my server build
- assets
|
plans - client
- server
ostrio:files prefers that the images are relative to the “Assets” directory, I put them all in there.
FloorplanImages = new FilesCollection({
collectionName: 'FloorplanImages',
storagePath: './plans/',
allowClientCode: false, // Disallow remove files from Client
onBeforeUpload(file) {
// Allow upload files under 10MB, and only in png/jpg/jpeg formats
if (file.size <= 10485760 && /png|jpg|jpeg/i.test(file.extension)) {
return true;
} else {
return 'Please upload image, with size equal or less than 10MB';
}
}
});
var plan = Floorplans.findOne({_id: Session.get("selected_floorplan_id")});
var bounds = [xy(0, 0), xy(plan.picwidth, plan.picheight)];
var planimage = FloorplanImages.findOne({name: plan.picname});
if(typeof planimage != 'undefined') {
if(image != "") { map.removeLayer(image) };
image = L.imageOverlay(planimage.link(), bounds).addTo(map);
map.setView(xy(plan.picwidth/2, plan.picheight/2), 0);
}else{
console.log("No floorplan image found");
}
I get “no floorplan image found”
when I look for one of the files in the bundle directory:
find ./ -name Electrical-1.png -print
I get no results. This tells me they are not getting packaged. Any ideas?