You cannot file for chapter 7 bankruptcy if you can afford Chapter 13 Bankruptcy or if your monthly income can be assessed enough to pay down your debt in a more appropriate bankruptcy filing. It all depends on income and your financial state.
Reference: Stephen Elias, Albin Renauer, and Robin Leonard. 2007. How to file Chapter 7 Bankruptcy. Chapter 1, Pg. 17-18