add caculation of upload token