Fix error callback when uploading assets

- Error handling would result in the error 'uploadedFilePath is not defined'