Search

User Manual

GETTING STARTED


MODULES AND PLATFORM


APPENDIX


TUTORIALS & HELPFUL TRICKS


STRATEGIC PARTNER LINKS

Sepasoft - MES Modules
Cirrus Link - MQTT Modules

RESOURCES

Inductive University
Ignition Demo Project
Knowledge Base Articles
Forum
IA Support
SDK Documentation
SDK Examples

ALL USER MANUAL VERSIONS

Ignition 8.1
Ignition 7.9
Ignition 7.8

Deprecated Pages

Employees

Sign In

Skip to end of metadata
Go to start of metadata

This function is used in Python Scripting.

Description

Downloads data from the gateway to a device running a session.

Syntax

system.perspective.download(filename, data, [contentType, sessionId, pageId])

  • Parameters

String filename - Suggested name for the downloaded file.

String data - The data to be downloaded. May be a String, a byte[], or an InputStream. Strings will be written in "UTF-8" encoding.

String contentType - Value for the "Content-Type" header. Example: "text/plain; charset=utf-8" [optional]

String sessionId - Identifier of the Session to target. If omitted, the current Session will be used automatically. When targeting a different session, then the pageId parameter must be included in the call. [optional]

String pageId - Identifier of the Page to target. If omitted, the current Page will be used automatically. [optional]

  • Returns

None

  • Scope

Perspective Session

Code Examples
Code Snippet
# Downloads the file "myFile.pdf" (located on the gateway) to the user running the current session.

filename = 'myFile.pdf'
data = system.file.readFileAsBytes('C:\\'+filename)
system.perspective.download(filename, data)
Keywords

system perspective download, perspective.download

  • No labels