fix cache_page deprecation warning
correction for truncation of upload names
store mimetype of uploaded files