upload limit in nginx conf istead of .htaccess

Hello, my nginx server is set in php.ini to allow upping up to 20mb size files so as to let phpmyadim be used with larger dbase files but I want to set a limit of 3mb for file uploads in elgg. As it is nginx, adjusting .htaccess won't work i don't think. The photo settings can be manipulated like this but other files don't seem to have any feature to allow setting limits. Any ideas? Is there a plugin I am needing?