15
Views
8
Comments
Solved
[Zip] How to name a ZIP file seperately from its file names?
Zip
Forge asset by OutSystems
Application Type
Service
Service Studio Version
11.55.48 (Build 64445)

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?

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP
Solution

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.

UserImage.jpg
Sten Mols

Hi Kilian, thats very helpfull information! Then it makes sense that there is no property for it in the creation of the ZIP also

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Glad I could be of help, even if it's just explaining things :).

2023-02-20 05-20-57
Nam Nguyen

Hi,

To achieve your goal, in download node, set your FileName as title.zip and File Content :  GetZipBinary.ZipBinary.

Cheers,
Nam

UserImage.jpg
Sten Mols

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

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

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.

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP
Solution

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.

UserImage.jpg
Sten Mols

Hi Kilian, thats very helpfull information! Then it makes sense that there is no property for it in the creation of the ZIP also

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Glad I could be of help, even if it's just explaining things :).

2025-12-18 01-28-51
Peter Hieu

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

2021-09-06 15-09-53
Dorine Boudry
 
MVP

@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"

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.