Bug: IOS and system.perspective.download

Using version 8.1.26

Android devices and browser works. IOS app gets a 55kb empty file. This happens with jpg, pdf and text files. IOS device can download file using browser without issue. The download does get the correct filename.

I uses the command
"system.perspective.download(filename=filename, data=filedata)"

I would report to support, I've come across bugs in the perspective app when downloading in the past. If it works on browser and android fine, it's likely a bug in the iOS version

Try specifying a Mime type. Here's an example of an onClick action where an image file is in the gateway's data folder.

Edit: I've also filed a ticket to look into making this a bit better.

	from java.io import File
	from com.inductiveautomation.ignition.gateway.util import MimeTypeUtils
	fileName = 'data/image.png'
	target = File(fileName)
	if (target.exists()):
		data = system.file.readFileAsBytes(fileName)
		fileName = target.getName()
		contentType = MimeTypeUtils.determineMimeType(fileName)
		system.perspective.download(filename = fileName, data = data, contentType = contentType)```