pulled common file uploading code into file upload handler, added file uploading under the post edit