Both are great for making money online, tho for me I prefer affiliate marketing. Because I don't need to create my product, I just need to promote the product of others and in that way, I can easily earn commissions for each sale or action generated through my referrals.
So the choice between blogging and affiliate marketing depends on your skills,interests, resources, and goals. Some people may find success in both combinations and some may not. So before you enter blogging and affiliate marketing, research is a must.