fix upload and view document