Merge "upload: Avoid &$this in hooks"