When the verse on charity was revealed, we used to hire ourselves out carrying loads. A man came and gave a large amount in charity, and people said, "He is only showing off!" Then another man came and gave a single measure of dates, and they said, "Allah has no need of this man's measure!" So this verse was revealed, "Those who criticize the believers who give charity willingly, and those who have nothing to give but their own effort" [Tawbah 9:79].
لما نزلت آية الصدقة كنا نحامل، فجاء رجل فتصدق بشيء كثير فقالوا: مرائي! وجاء رجل فتصدق بصاع فقالوا: إن الله لغني عن صاع هذا! فنزلت: {الذين يلمزون المطوعين من المؤمنين في الصدقات والذين لا يجدون إلا جهدهم} الآية.
Bukhari narrated it in the chapter on zakat (1415), from Ubaydullah bin Saeed, who said, Abu Numan Hakam (that is, Ibn Abdullah Basri) narrated to us, who said, Shubah narrated to us, from Sulayman, from Abu Waail, from Abu Masud, who said (and he mentioned it).