edit upload file function