Remove upload methods from the scope when the widget is removed. Fixes #2258.