upload data as scalar or reference