Description
The Create Download activity is used to create a download link for arbitrary content that can be passed to a client workflow and presented to a user. The download link has a limited lifespan and can only be accessed in network environments that can access the server.
Usage
The Create Download activity could be used to create a download link for file content read with the Read File Bytes activity. This URL could be set as an output of the server workflow with the Set Workflow Output activity. Finally, a clickable link could be presented in a form by using the markdown option in the Set Form Element Property activity.
Inputs
Content |
Required Type: String | Number Array The text or byte content of the file. Bytes are the raw binary values that represent content. A byte array is represented by a list of numbers between 0 and 255. Providing empty or invalid content will cause an error. |
Content Type |
Optional Type: "application/json" | "application/octet-stream" | "application/pdf" | "application/xml" | "application/zip" | "image/jpeg" | "image/png" | "text/csv" | "text/html" | "text/plain" | String The MIME type of the content. This input will determine how the content is served to the user. For example, PDF ("application/pdf") and text ("text/plain") files will be displayed, whereas CSV ("text/csv") files will be downloaded. Workflow Server supports any MIME type that is registered with the Internet Assigned Numbers Authority (IANA) and implemented by Microsoft's FileExtensionContentTypeProvider.The full list of MIME types registered with IANA can be found here. If the Content Type input is blank or invalid, the MIME type will be determined from the file extension in the Filename input. If this is not possible, the MIME type will be determined from the type of the Content input. String content will use the "text/plain" MIME type, and byte content will use the "application/octet-stream" MIME type. More information about MIME types can be found here. |
Filename |
Required Type: String The full name (with the extension) that the file will be saved as when the user downloads it. A filename that is too long, empty, or has invalid characters, such as slashes or colons, will cause an error. Filenames with executable extensions, such as ".exe", will cause an error as these file types are a security risk to the end user. |
Expiry |
Optional Type: Number The time till expiration of the download link, in minutes. After this time period has passed, the download link will no longer allow access to the file. If a value is not given or the value is invalid, the maximum lifetime of a link (7 days), will be used. A shorter expiration time provides higher security. |
Outputs
url |
Type: String The download link URL. Accessing this URL will download or display the file. |
Properties
For information about the ID, Display Name, and Description properties, see Properties Common to all Activities.
Supported Environments
Environments capable of running this activity
Server
|
Client |
|||
Geocortex Web |
Geocortex Mobile |
Geocortex Viewer for HTML5 |
Web AppBuilder |
|
---|---|---|---|---|
|
|
|
|
|
Offline Support
This activity does not work when the device is offline.