Zip Upload

Block Group:Data Services
Icon:Zip Upload block icon

The Zip Upload block adds, into the specified project folder, all of the files that are included in an input ZIP file that is specified as binary.

For information on using dataflow blocks, see Dataflow.

Note

One way to convert a ZIP file to binary is by using the Zip Download block. However, copying and pasting the output string of Zip Download does not effectively transfer the binary content. Instead of copying and pasting, you must create a binding.


Input/Output Properties

The following properties of the Zip Upload block can take input and give output.

  • invoke (trigger)
  • enabled (boolean)
  • autoRun (boolean)
  • folder (DGLux5 file path)
  • data (binary)

invoke causes the files to be added to the folder. Only works if enabled is set to TRUE.

enabled specifies whether the block is currently set to add the files to the folder.

  • TRUE: The files are added to the project as specified by invoke and autoRun.
  • FALSE: The files are not added to the project.

autoRun specifies whether the files are added automatically.

  • TRUE: The files are added every time any property is changed. The first time that the data property is populated counts as a change.
  • FALSE: The files are added only when the invoke property is triggered.

folder is the project folder where the files are to be inserted.

data is the ZIP file, as binary.


Output Property

The following property of the Zip Upload block can give output but cannot take input.

  • onComplete (event)

onComplete fires when the files have been added to the folder.


Example

The following image demonstrates a typical use of the Zip Upload block. In this example, when the Zip Upload block is invoked, the unzipped file are placed in a directory named new_folder.

Zip Upload dataflow model