Hi,
My goal is to create a Zip file called for example: title.zip
While adding a file called: test.txt in the zip
Now using the following flow:
I am unable to find anywhere if it is possible to seperately change the name of the zip in Outsystems? Adding a file with a certain name it seems that THAT file name gets used as the name of the zip?
Hi Sten,
The ZIP file doesn't have a name at all. It gets a name when you download it. If you specified a name that's equal to the added file, then it gets that name.
Hi Kilian, thats very helpfull information! Then it makes sense that there is no property for it in the creation of the ZIP also
Glad I could be of help, even if it's just explaining things :).
To achieve your goal, in download node, set your FileName as title.zip and File Content : GetZipBinary.ZipBinary.
Cheers,Nam
Ah yes, should have specified that I am trying to name it before it gets downloaded, because doing it with the download node is clear to me
As I think is sufficiently clear by now, that's not possible. A file gets a name on the file system of your computer. In memory it's just a binary blob without a name. Therefore you specify the name when on the download node, so the browser can tell the operating system what to name the downloaded file.
Hi @Sten Mols
There are three key points to note:
– A ZIP file doesn’t have an actual name until it’s downloaded.
– In the Download node, set FileName = "title.zip" and FileContent = GetZipBinary.ZipBinary to define the ZIP name.
– If you don’t specify a name, OutSystems may use the name of the first file added to the ZIP.
Hope this helps,
Peter Hieu
@Peter Hieu ,
please don't answer just to answer.
your first 2 points are only restating what has already been said many hours earlier.
Your 3rd point is incorrect, the name on the download node is mandatory, so there is no such thing as "If you don't specify a name"