Looking for example to read in a zip file from api call(specific url) using java in adobe campaign.
Retrieve a zip file then decompress
started by
/* URL */
var url = "https://MY-URL";
var http = new HttpClientRequest(url);
http.header["Connection"] = "Keep-Alive";
http.header["Content-Type"] = "application/x-www-form-urlencoded";
http.header["Authorization"] = "Basic" + getOption("MYAUTH")
http.method = "GET";
http.execute();
http.disconnect();
logInfo("Processing complete.");
Solved! Go to Solution.
Views
Replies
Total Likes
Hi Daver,
You may use either the ZipFile class (see JSAPI.chm documentation, under license).
You must get the URI and save it as a file.zip (for instance in a temporary folder), then you use the ZipFile class on that file.
Or, most of all if the compressed file is made with specific compression algorithms or options, I recommend using 7-ZIP free tool on your server (if possible for you to get such tool allowed, depending on the hosting On Cloud/On Premise).
In that case, it must be allowed in serverConf.xml if your Adobe Campaign instance has a recent build version.
You can either use an execCommand method (JSAPI again) or in a workflow, the External task activity to uncompress the file.
Regards.
J-Serge
Views
Replies
Total Likes
Hi Daver,
You may use either the ZipFile class (see JSAPI.chm documentation, under license).
You must get the URI and save it as a file.zip (for instance in a temporary folder), then you use the ZipFile class on that file.
Or, most of all if the compressed file is made with specific compression algorithms or options, I recommend using 7-ZIP free tool on your server (if possible for you to get such tool allowed, depending on the hosting On Cloud/On Premise).
In that case, it must be allowed in serverConf.xml if your Adobe Campaign instance has a recent build version.
You can either use an execCommand method (JSAPI again) or in a workflow, the External task activity to uncompress the file.
Regards.
J-Serge
Views
Replies
Total Likes
Views
Likes
Replies