fixed scope for upload flow function