yuuvis® RAD Q&A

0 votes
by (740 points)


if I upload a file too yuuvis, yuuvis determines the filetype of that file.
I guess this is done by the file extension.

The filetype however determines how the rendition is displayed.
(with the default PDF preview, the monaco editor or the image preview)

We get text files with the extension RAW from our customers which are automatically upladed to yuuvis.
Yuuvis now sets the filetype to image.
(Which is not wrong, because RAW image files also exist)

Because yuuvis can't display our file as an image, yuuvis shows the message "The format can't be displayed. You can download this file with this link".

Because we don't have an RAW files as images we would like to change the classification of RAW files to textfile or octet-stream.
So the preview is shown as a PDF or in the monaco editor.
Is this possbile to change this within a config file?

Thanks in advance,

1 Answer

0 votes
by (16.9k points)
selected by
Best answer

Hello schulerb,

starting with version 7.14 the client decides depending on mimetype if it fetches the pdf rendition from rendition-plus or shows the content file in the monaco viewer or the image viewer. You can customize this behaviour as described here: https://help.optimal-systems.com/yuuvis_develop/display/onpremise/Customizing the Client Preview

So in your case you would have to add the following lines to the file "<service-manager-data>\webresource\resources\client\assets_default\config\extend.json"

"preview": {

"fileSizeLimit": 10485760,
"viewers": [
{ "mimeType": ["application/raw"], "viewer": "assets/_default/api/monaco/?path=${path}&mimeType=${mimeType}&fileExtension=${fileExtension}&lang=${lang}&theme=${theme}" }


(change the mimeType value to your actual RAW mimeType.)

If you also want the rendition to change its behaviour, you will have to add this mimeType to the Plaintext converter. To do this edit the file "<rendition-plus>\renditionplus\bin\converter\Plaintext2Pdf.xml" and add the mimeType to the list of source mimeTypes (line 5).
To make it persist over updates, you will then have to save the file to the folder "<rendition-plus>\renditionplus\bin\custom", give it a different name (filename and converter-name (line 2) and increase the priority of the converter (line 4).

Best regards

by (740 points)
Thank you for your answer Nikolai,

I think the better solution would be to change the behaviour of the rendition service.
Otherwise the RAW files would be found under images if I use the search.

Unfortunatly it doesn't work. The steps I did:
1. Copy the file Plaintext2Pdf.xml to custom folder
2. Rename the file to toPlaintextConverter.xml
3. Change the name of the converter to ToPlaintext-custom
4. Add the mimetype <source>^(application/raw)</source> in line 5
5. Increase priority to 401

Did I miss something or made a mistake?
by (16.9k points)
Please check that the mimetype is correct. Rendition-Plus needs to be restarted for the changes to take effect.
by (740 points)
The mimetype is incorrect.
Now it works.

But its funny so the preview does not work while entering the metadata in the Save process.
The preview works after the file is saved.

Related questions

0 votes
1 answer
0 votes
2 answers
0 votes
1 answer
asked Jul 22, 2021 by Marcel Maier (660 points)
0 votes
1 answer