GLIDEZIPUTIL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-26-2017 06:44 PM
Hi All,
I need to un gzip the attachment which has an image. I have got the attachment from the sys_attachment_doc table in 4k chunks. Ordered by position, base64 decoded the chunks and added them together to get a gzip version. I can also do this via the attachment API. Again I will get gzip version.
To unzip I wanted to use GlideZIPUTIL ZIP_UNZIPPING function. when I explore it using following
or (var i in GlideZipUtil) {
gs.print(i);
}
I get
*** Script: addEntry
*** Script: CHARSET
*** Script: UTF_8
*** Script: _8859
*** Script: _8859_1
*** Script: ZIP_UNZIPPING
*** Script: WINDOWS_1252
*** Script: ZIP_WRITTEN
*** Script: ISO_8859_1
*** Script: ZIP_ZIPPING
But when I try accessing ZIP_UNZIPPING it gives me error
Attempted script access to inaccessible member denied - com.glide.util.ZipUtil:ZIP_UNZIPPING:
Evaluator: java.lang.SecurityException: Illegal access to field ZIP_UNZIPPING in class com.glide.util.ZipUtil
Caused by error in script at line 21
18: }
19:
20: this.ZipUtil = new GlideZipUtil();
==> 21: var img = ZipUtil.ZIP_UNZIPPING(base); //won't let me access ZIP_UNZIPPING
22:
23: quote = quote + "<tr><td >"+ img +"</td></tr>" //trying to print image
24:
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-14-2018 06:35 PM
Unfortunately that is not working. The error returned is: Wrong format or corrupted file
Any further assistance would be greatly appreciated.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-14-2018 07:06 PM
In what scenario, does it happen ?
when you attach the file to Datasource as zip and then use your transform map?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-14-2018 07:16 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-14-2018 07:32 PM
I think your issue is the zipped file is xlsx. If the zipped file is xls then it works.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-14-2018 07:34 PM
btw which version are you on? Istanbul, Jakarta Kingston? I have verified in Kingston, but earlier in Fuji etc too this has worked. So I think loading records from a datasource zipped file shouldn't be an issue.