upload res on js