0
createZipFile
To create a zip archive including all files of a given file array
With this function, you create a zip archive containing all files passed in an array.
At the moment, the function works only if it is executed server-side. The assignment of files to a variable must also be carried out on the server side. More about execution context.
Syntax
createZipFile(nid, [file], string)
Return
file
Examples
createZipFile(record, files, filename)
creates a zip archive with all files of the array files
and a given name.
do as server
let products := (select Products).photo
File := createZipFile(this, products, "Products.zip")
end
Result: The Products.zip zip archive containing all product photos from the Products table is saved in the File image field.
To zip all saved files of a record:
do as server
File := createZipFile(this, files(this), "Product.zip")
end
For a single image field:
do as server
File := createZipFile(this, [image field], "Product.zip")
end
See also
createTextFile
which creates a text file with a given name and content.
Reply
Related articles
Content aside
- 2 mths agoLast active
- 11Views
-
1
Following