How to fix unability to save ".eps" file to marklogic database because XDMP-JSONDOC error is thrown?

brztss

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?

Mads Hansen

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.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How to save MarkLogic data in csv file using xdmp:save

How to save an .EPS file to PNG with transparency in Python

xdmp:log Error while using CPF (MarkLogic)

MarkLogic "XDMP-FRAGTOOLARGE" error while storing 200MB+ File using REST

How to fix "Cannot save file" error in dev-c++

export results of MarkLogic query (mlcp, xdmp.save)

Marklogic how to store xquery file into Modules database

How to fix error with MySQL because of timezone change?

How to fix 'Error: unable to open database file' in Flask app?

How do I fix "file can't be opened because it is from an unidentified developer" error?

How to fix this type error thrown by regular expression in python?

How to use xdmp.Spawn() to do a temporal delete in MarkLogic 9?

How does MarkLogic's "xdmp:collection-delete" work?

How can i save the Error thrown by false Login

Getting 'cannot be blank' error on save() because of 'file' validation rule

How to clone a MarkLogic database

Error thrown on trying to save a single rdf triple using rdf_save to a file

How to fix CloudRun error 'The request was aborted because there was no available instance'

How to fix "NoSuchElementException" being thrown

Error when trying to save file path to database

How to fix "the save file operation failed to connect to the open and save panel"

Marklogic How to save multiple Workspaces

MarkLogic - How to save pdfs to Filesystem

Copy documents from one database to another in MarkLogic - xdmp:document-insert Failing

Marklogic xdmp:log() in Query Console

MarkLogic - xdmp:Spawn Privilege for trigger

How to fix error "The system cannot find the file specified." when trying to access a Firebird database

How to save image to database with path file

How to save output from Scrapy into file or database