A 58-year-old man presents with melaena and dizziness. He takes low-dose aspirin for secondary prevention after myocardial infarction. His blood pressure is 95/60 mmHg and pulse 110 beats/min. Hb is 85 g/L. After initial resuscitation, what is the most appropriate next step in managing his upper gastrointestinal bleeding?