Hi, I have one question for Outsystems. How do I ZIP my uploaded attachment files when the user done uploading their file and maybe click on a button they will be able to ZIP all the uploaded attachment into a ZIP file. The screenshot that I circle in red is the attachments that i wish to be zipped into one folder only. Hopefully there will e a guide or solution for this. Once again thank you so much.
Below the attachment is my OML File.
HI Freeman Tan,
try to use this forge component
Gzip Compress/Decompress
Thanks
Prince
Hi Freeman Tan ,
Please check this link it may be useful for you to resolve the issue:
https://www.outsystems.com/forums/discussion/65749/create-zip-folders-on-export-action/
Thank you,
Gayatri
Yes, I know there is a lot of forge plugin i did try some of them already. But the problem is does can it ZIP uploaded attachment files into a ZIP Folder???
did you try collecting them in a list and adding into forge component action in loop?
Hi @Freeman Tan ,
Do you mean doing Zip on the client side, then upload those Zip to the server side ?
If so, then you need to use javascript Zip (this is one of those javascript : https://github.com/Stuk/jszip)
Hi @Freeman Tan
you can use Zip extension by Outsystem
First you need CreateZip, then use loop to iterate FileName and FileContent in your attachment table for AddFile input. After add all your file to CreatedZip, use CommitChange to update previous process, in the end use GetZipBinary to get the Zip binary for download.
If you want more than one folder, you can add prefix folder name on FileName input.
ignore prefix folder if there is no need additional folder.
Then if you already have Zip file that need to add more file, you can use LoadZip first and then use this LoadZip.ZipHandle instead CreateZip.ZipHandle for next process.
Regards
Great solution. And it's already native to OutSystems. Thanks for sharing.
thanks for sharing, its quite straight forward, just want to add, if using looping to add file, the Commit Changes must be outside of loop, or it will end only one file in the .zip
Hi Freeman,
You can use this forge component it is very useful and its also having a proper demo to show how to use it.
https://www.outsystems.com/forge/component-overview/16326/zip-example
hope it helps.