From fa1a8d01db382c5b97375db008f837ee2579dd88 Mon Sep 17 00:00:00 2001
From: Carsten  Rose <carsten.rose@math.uzh.ch>
Date: Wed, 24 Jun 2020 13:13:08 +0200
Subject: [PATCH] Manual.rst: add doc for F10778

---
 Documentation/Form.rst | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/Documentation/Form.rst b/Documentation/Form.rst
index 6157a9d3a..1c44bdfa1 100644
--- a/Documentation/Form.rst
+++ b/Documentation/Form.rst
@@ -2027,6 +2027,23 @@ FormElement.parameter
 
     * The following attributes are hard coded (can't be changed): `s|M:file|d|F`
 
+* *fileUnzip* - If the file is a ZIP file (only then) it will be unzipped. If no directory is given via ``fileUnzip``, the
+  basedir of ``fileDestination`` is taken, appended by ``unpack``.
+
+  If an unzip will be done, for each file of the archive STORE_VAR will be filled (name, path of the extracted file,
+  mime type, size) and the following will be triggered: *sqlValidate, slaveId, sqlBefore, sqlAfter, sqlInsert, sqlUpdate*.
+
+  Example::
+
+    fileDestination = fileadmin/file_{{id:R}}.zip
+    fileUnzip
+    sqlValidate ={{! SELECT '' FROM (SELECT '') AS fake WHERE '{{mimeType:V}}' LIKE 'application/pdf%' }}
+    expectRecords=1
+    messageFail=Unexpected filetype
+
+    # Set new
+    sqlAfter={{INSERT INTO Upload (pathFileName) VALUES '{{filename:V}}' }}
+
 * `fileSplit`, `fileDestinationSplit`, `tableNameSplit`: see :ref:`split-pdf-upload`
 
 * Excel Import: QFQ offers functionality to directly import excel data into the database. This functionality can
-- 
GitLab