Better TS upload logic