unfortunately this is not trivial to do, because you don't know the size of the incoming file until the user posts it.
NetTalk 7 has a facility to;
a) prevent malicious clients from just uploading massive files and
b) the enhanced file-upload script let's you set a limit so that user knows when a file they've selected is too big.
cheers
Bruce