Add resource file upload size limit when publishing

MANUAL-UPGRADE: Size limit setting "file-upload-limit" should be added
to configuration file (e.g. development.ini)
This could be a problem if we load a 2gb or more file into memory. Let's use some kind of smart buffer object.