How to unzip a file in script
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2014 09:20 AM
An external service is sending a text file to ServiceNow, this is being received with a custom processor.
The file contents (HTTP POST body) text is easily read using:
var data = GlideStringUtil.getStringFromStream(g_request.getInputStream());
They are sending a ZIP file however, which needs to be decompressed. Is there some script that will do this? I've looked into ZipImportStream, but not sure how to get the bytes inflated.
Thanks,
Labels:
- Labels:
-
Service Mapping
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2020 04:02 PM
Check if this is helpful: https://community.servicenow.com/community?id=community_article&sys_id=4d2653c41b52cc10fff162c4bd4bc...