I solved it.

I changed to OnPage() method to use a %Stream.FileCharacter as follows:

ClassMethod OnPage() As %Status
{
	
	set fs = ##class(%Stream.FileCharacter).%New()
	set fs.Filename = %request.Get("filepath")
	
	do fs.OutputToDevice()
	quit $$$OK	
	
}