handle array upload