I am trying to access an excel file from marklogic. When I try to get the manifest I am getting invalid zip file error.
const fileName = "https://www.cisco.com/c/dam/en/us/td/docs/cloud-systems-management/network-automation-and-management/dna-center/1-3/supported/devices/DNA1_3-Supported-Devices-List.xlsx";
var response = xdmp.httpGet(fileName, { "verifyCert": false, "encoding": "auto" }).toArray();
var excelFile = response[1];
xdmp.zipManifest(excelFile);
Error:
XDMP-INVZIP: >xdmp.zipManifest(Document(BinaryNode("e4ad90d0831406080021e5a29ee89dabc6ac00dc9f0013c888e48d9be6b9afe6..."))) -- Invalid zip file
I believe the encoding option is the culprit. This works for me if I remove the encoding option:
{ "verifyCert": false }
or set the encoding to UTF-8:
{ "verifyCert": false, "encoding": "UTF-8"}