File viewer handles different content types by requesting an ArrayBuffer and acting accordingly based on the content-type header.