refactor upload method to plugin

other extensions can use this trigger an upload event too now