Page tree
Skip to end of metadata
Go to start of metadata

Overview

We created a new file upload widget to support the HTML5 capability of transmitting files by dropping them onto a page. The widget automatically checks and uploads valid file(s) dragged onto it.

This upload widget works for Genie and Rich Display files. It does not work for mobile devices.

For security the new widget requires an Exit Program on the server side to validate files being uploaded, just like the old widget.

If you are familiar with the old File Upload widget, then this widget is very similar.

This widget is introduced with Profound UI Version 5, Fix Pack 2.0.

Differences from Old File Upload Widget

The drag/drop widget has these same properties as the old widget:

  • number of files
  • size limit
  • target directory
  • rename to
  • overwrite files
  • allowed type
  • upload response (Rich UI Only)
  • onupload (Genie Only)

The new widget does not have the "selection mode" property. A new property, auto submit is introduced.

Selection Properties

number of files, size limit, and allowed type are checked on the client side. If the file is too large or its type is not allowed, then a warning appears and nothing uploads. If a user drags too many files onto the widget, files upload up to the number specified. That is, if number of files is 1, and the user drags 2 files over, then only 1 file uploads and a warning appears.

The Exit Program on the server validates the file before it is written to the filesystem. If the file is rejected, then the file data is discarded and a warning is sent back to the Drag/Drop File Upload widget on the client browser.

Destination Properties

target directory specifies where the file should be saved. The Exit Program must allow files to upload to the specified destination or else the upload fails with a warning.

rename to specifies a new file name that the uploaded file will take after it is uploaded to the server. This property only applies when number of files is set to 1.

overwrite files specifies whether an uploaded file should overwrite an existing server file in the destination folder having the same name. The default is false.

Genie only Properties

onupload is a property that authorized users can set to call when the upload finishes successfully. Read more about the onupload event.

auto upload determines when the upload begins: either after the file is dropped or after the user clicks an "Upload" hyperlink.

Possible Values: True, False

Product: Genie

Default: False

Rich UI only Properties

upload response can be used to pass file details back to the RPG program. Read more about the upload response property.

auto submit determines whether to submit the page or not after dropping file(s), causing the upload to start. Similar to the auto advance property of other input widgets, when auto submit is true the upload starts and the screen automatically submits as if the user pressed the Enter key. When auto-submit is false or not set, the file(s) stay listed in the widget until the user clears it, submits the screen, or exits the program.

Promptable? DROPDOWN

Possible Values: True, False

Bindable? Yes

Product: ProfoundUI

Default: False

Supported Browsers

This widget relies on relatively new Javascript APIs, so it will not work on older browsers. Use any of these web browsers for drag-and-drop file uploads:

  • Apple Safari version >= 6.0
  • Google Chrome version >= 7.0
  • Microsoft Internet Explorer version >= 10.0
  • Mozilla Firefox version >= 4.0

 

 

  • No labels