add server-side filesize check on uploads

This adds a server-side check on the filesize of the uploads.