Add generic file preview to history page