We reuse the tops from the bag style fly traps on old canning jars and we have tried many fillers to attract flies. By far the most effective has been thin slices of potato in water. It can develop a healthy smell if not changed often but I can feed the contents to my chickens without worrying about making them sick!
I believe what attracts them is smell of the yeast from the potato water (old school bread makers used potato starter). You can also use a little flour like you are making a sourdough starter, but it takes a bit for the yeast to build up, so I prefer the potato.
There were millions of the little blood suckers. But thanks to this tiny ad, I wasn't bitten once.