remade upload preview helper to service