upload and view func