I am unable to save file with ".eps" extension to MarkLogic database. Marklogic REST API throws server error with following message: "XDMP-JSONDOC: Document is not JSON". What is important is that I have several instances of database, each on different environment and I am unable to save this file only on one of those instances.
So I assumed that this one instance is configured improperly and found out, that there are differences between four mimetypes returned by xdmp.mimetypes()
and those shown on mimetypes admin page.
What is more, config for mimetype "application/postscript" returned from xdmp.mimetypes()
has "json" format, and one configured via mimetypes admin page has valid "binary" format. I think that this may cause inability to save ".eps" file.
Why do those differences exist and how can I solve this issue?
eps should be binary format.
On my system, the mimetype for eps has:
{
"mimetype": "application/postscript",
"extensions": "ai eps ps",
"format": "binary"
}
If you have a cluster with a mimetype declaration of json for eps, then fix it. Maybe someone changed the format from binary to json, or maybe they added a new mimetype to the cluster config. Inspect the mimetype configs, find the mistake, and correct it.
You can do this via the Admin UI or via API calls to admin.mimetype()
, admin.mimetypesDelete()
, and admin.mimetypesAdd
.