save the system assigned name for uploaded file and use it for the rest

fixes #1758