working code for wave upload