Refactored file upload to use constant for registry key