buildmyzip
Reactive icon

BuildMyZip

Stable version 1.0.0 (Compatible with OutSystems 11)
Uploaded
 on 29 Aug (14 hours ago)
 by 
Solverines Technology Solutions
0.0
 (0 ratings)
buildmyzip

BuildMyZip

Documentation
1.0.0

BuildMyZip

Overview

BuildMyZip is an OutSystems 11 (O11) External Logic component that provides a reusable action for creating ZIP archives from multiple files.

The component accepts a list of files containing their file names and binary content and combines them into a single ZIP archive. It also supports optional password protection.

BuildMyZip is designed to simplify scenarios where an OutSystems application needs to package multiple files into a single downloadable or transferable ZIP archive.


Features

  • Create a ZIP archive from multiple files.

  • Combine files of different types into a single ZIP archive.

  • Accept file content as OutSystems Binary Data.

  • Specify a custom file name for each file.

  • Return the generated ZIP archive as Binary Data.

  • Support optional password protection.

  • Reusable across O11 applications.

  • Implemented as External Logic for server-side processing.


Compatibility

RequirementSupported
OutSystems 11Yes
Reactive WebYes
Traditional WebYes
MobileSupported through server-side logic
External LogicYes

Getting Started

Installation

  1. Install BuildMyZip from OutSystems Forge.

  2. Reference the component from your OutSystems application.

  3. Use the exposed BuiltMyZip action.

  4. Create a FileInput list containing the files that should be included.

  5. Pass the list to BuiltMyZip.

  6. Use the returned ZipFile Binary Data according to your application requirements.


Data Structure

FileInput

FileInput represents an individual file that will be included in the ZIP archive.

Attributes

AttributeData TypeDescription
FileNameTextSpecifies the name of the file to be included in the ZIP archive.
FileBinaryBinary DataContains the binary content of the file to be included in the ZIP archive.

Example

FileInput
├── FileName   = "Invoice.pdf"
└── FileBinary = InvoiceBinary

Multiple FileInput records can be added to a list.


Actions

BuiltMyZip

Creates a ZIP archive from the specified list of files, with optional password protection.

Inputs

ParameterData TypeRequiredDescription
IsPasswordProtectedBooleanYesSpecifies whether the ZIP archive should be protected with a password.
PasswordTextConditionalSpecifies the password used to protect the ZIP archive when password protection is enabled.
FileInputFileInput ListYesSpecifies the list of files to be included in the ZIP archive.

Output

ParameterData TypeDescription
ZipFileBinary DataContains the generated ZIP archive as binary data.

Basic Usage

The basic process consists of four steps:

Get Files
    ↓
Create FileInput List
    ↓
Call BuiltMyZip
    ↓
Use ZipFile

Step 1 — Prepare the files

Retrieve or generate the files that need to be packaged.

For example:

Invoice.pdf
Report.xlsx
SupportingDocument.docx

Each file should have:

  • A file name

  • Binary content


Step 2 — Create the FileInput List

Create a list of FileInput records.

Example:

FileInput List

1.
FileName   = "Invoice.pdf"
FileBinary = InvoiceBinary

2.
FileName   = "Report.xlsx"
FileBinary = ReportBinary

3.
FileName   = "SupportingDocument.docx"
FileBinary = DocumentBinary

Step 3 — Call BuiltMyZip

Configure the action:

BuiltMyZip

IsPasswordProtected = False
Password             = ""
FileInput            = FileInput List

Step 4 — Use the ZipFile output

The action returns:

ZipFile

as Binary Data.

The resulting ZIP contains:

Archive.zip
├── Invoice.pdf
├── Report.xlsx
└── SupportingDocument.docx

The returned Binary Data can then be used by the consuming application according to its requirements, such as providing the archive for download or storing it.


Password-Protected ZIP

BuildMyZip supports optional password protection.

To enable password protection:

IsPasswordProtected = True
Password             = "YourPassword"

The resulting ZIP archive is generated with the specified password.

Example

BuiltMyZip

IsPasswordProtected = True
Password             = "MySecurePassword"
FileInput            = FileInput List

The generated archive can then be handled by the consuming application as Binary Data.

Password Validation

When IsPasswordProtected is enabled, a password should be supplied.

Do not expose passwords unnecessarily in client-side logic or application logs.


Multiple Files

BuildMyZip is intended for scenarios where multiple files need to be combined into a single ZIP archive.

For example:

FileInput List

Invoice.pdf
PurchaseOrder.pdf
Receipt.pdf
DeliveryNote.pdf

The resulting ZIP contains:

Archive.zip
│
├── Invoice.pdf
├── PurchaseOrder.pdf
├── Receipt.pdf
└── DeliveryNote.pdf

File Names

The FileName attribute determines the name used for the file inside the ZIP archive.

For example:

FileName = "MonthlyReport.xlsx"

The generated archive will contain:

MonthlyReport.xlsx

Use unique file names when adding multiple files to the same archive.


Validation

BuildMyZip validates the supplied input before creating the ZIP archive.

The following conditions should be avoided:

Empty File List

The FileInput list should contain at least one file.

Empty File Name

Every file should have a valid FileName.

Missing Binary Content

Every file should provide its corresponding FileBinary.

Duplicate File Names

File names within the same archive should be unique.

Missing Password

When password protection is enabled, provide a valid password.


Common Use Cases

Download Multiple Documents

Combine multiple documents into one archive before providing them to an end user.

Documents
    ↓
FileInput List
    ↓
BuiltMyZip
    ↓
ZipFile
    ↓
Download

Generate Report Packages

Package multiple generated reports into a single ZIP archive.

Report 1
Report 2
Report 3
Report 4
    ↓
BuildMyZip
    ↓
Reports.zip

Document Bundling

Combine related documents into a single package.

Example:

Customer Documents
├── Contract.pdf
├── Agreement.pdf
├── Invoice.pdf
└── SupportingDocument.pdf

Result:

CustomerDocuments.zip

File Export

Applications that generate multiple files can package them into one archive before providing them to another system or user.


Recommended Implementation Pattern

A typical server-side implementation can follow this pattern:

Retrieve Files
      ↓
Validate Files
      ↓
Create FileInput List
      ↓
Configure Password Protection
      ↓
BuiltMyZip
      ↓
Receive ZipFile
      ↓
Store / Download / Transfer

Performance Considerations

The ZIP archive is generated from the supplied Binary Data.

For large files or large file collections:

  • Avoid unnecessarily loading the same files multiple times.

  • Process only the files required for the archive.

  • Consider the memory requirements of the consuming application.

  • Avoid creating multiple copies of large Binary Data values where possible.

The overall processing time depends on the number and size of files being compressed.


Security Considerations

If the archive contains sensitive or confidential information:

  • Consider enabling password protection.

  • Avoid exposing passwords in logs.

  • Avoid hard-coding passwords.

  • Apply the application's existing authorization rules before retrieving files.

  • Ensure users only receive files they are authorized to access.

Password protection should not replace application-level authorization and access control.


Example End-to-End Flow

Consider an application that needs to provide three documents as one download.

Input

Invoice.pdf
Report.xlsx
Contract.pdf

Create FileInput List

FileInput[0]
    FileName   = "Invoice.pdf"
    FileBinary = InvoiceBinary

FileInput[1]
    FileName   = "Report.xlsx"
    FileBinary = ReportBinary

FileInput[2]
    FileName   = "Contract.pdf"
    FileBinary = ContractBinary

Execute

BuiltMyZip
    IsPasswordProtected = False
    Password             = ""
    FileInput            = FileInput List

Output

ZipFile

The output contains a ZIP archive equivalent to:

Archive.zip
│
├── Invoice.pdf
├── Report.xlsx
└── Contract.pdf

Error Handling

The consuming application should handle errors from the External Logic action appropriately.

Recommended approach:

Call BuiltMyZip
       ↓
Check execution result
       ↓
Success → Use ZipFile
Failure → Handle / Display Error

For user-facing applications, avoid displaying internal technical details directly to end users.


Dependencies

BuildMyZip is implemented as an OutSystems 11 External Logic component.

The component relies on its packaged external ZIP implementation to create the archive.

Consumers of the component do not need to implement the ZIP creation logic themselves.


Demo Application

The BuildMyZip Demo application demonstrates how to use the BuildMyZip External Logic component.

The demo application can be used to understand:

  • How to prepare a FileInput list.

  • How to provide file names.

  • How to provide Binary Data.

  • How to invoke BuiltMyZip.

  • How to handle the resulting ZipFile.

  • How to configure optional password protection.

Demo Flow

Select / Retrieve Files
        ↓
Build FileInput List
        ↓
Configure ZIP Options
        ↓
BuiltMyZip
        ↓
Receive ZipFile
        ↓
Use Generated ZIP

API Summary

ElementTypePurpose
FileInputStructureRepresents an individual file.
FileNameTextSpecifies the file name.
FileBinaryBinary DataContains the file content.
BuiltMyZipExternal Logic ActionCreates the ZIP archive.
IsPasswordProtectedBooleanEnables or disables password protection.
PasswordTextSpecifies the ZIP password when enabled.
FileInputFileInput ListProvides the files to package.
ZipFileBinary DataReturns the generated ZIP archive.

Limitations

  • Input files must be provided as Binary Data.

  • The generated ZIP archive is returned as Binary Data.

  • File names should be unique within an archive.

  • Large archives can require significant memory during processing.

  • Password-protection behavior depends on the ZIP implementation used by the component.

  • The component does not replace application-level authorization for the files being packaged.


Version History

1.0.0

Initial release.

Included

  • ZIP archive generation.

  • Multiple file support.

  • FileInput structure.

  • Binary file processing.

  • Optional password protection.

  • ZipFile Binary Data output.


Support

For questions, issues, feature requests, or feedback, use the support/discussion area associated with the BuildMyZip component on OutSystems Forge.

When reporting an issue, include:

  • BuildMyZip version.

  • OutSystems platform version.

  • Description of the issue.

  • Steps to reproduce.

  • Relevant error message.

  • Approximate number and size of files being processed.


License

Refer to the license specified on the BuildMyZip Forge component page for the applicable terms of use.