Edit post function for uploading txt files.