User Manual

GETTING STARTED


OTHER EDITIONS


LAUNCHERS


MODULES


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

ALL USER MANUAL VERSIONS

Ignition 8.1. Offline Version (04/2021)
Ignition 8 Online Version
Ignition 7.9 Online Version
Ignition 7.8 Online Version

Deprecated Pages

SDK Documentation

Employees

Sign In

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Scripting_function


Panel
titleDescription

Downloads data from the Gateway to a device running a Session.

When calling from the Gateway scope, the call must include a sessionId. 

New_in
Version8.1.14


This function interacts with mobile apps directly to ensure that download requests can be saved to the local device. Requires version 1.0.2 of the Ignition Perspective App.

Panel
titleSyntax
Note_friendly

This function accepts keyword arguments.

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, for 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

Nothing

  • Scope
Gateway, Perspective Session

Perspective Session

Panel
titleSyntax
Note_friendly

This function accepts keyword arguments.

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, for 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. 

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

  • Returns

Nothing

  • Scope

Gateway

Panel
titleCode Examples
Code Block
languagepy
titleCode 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)
Panel
titleKeywords

system perspective download, perspective.download