Emit an event 'done' when upload is finished