The viewUrl is built as an image URI bounded to 100x100px, whatever the file type (image or not). See ResourceElementTypeHelper.
String viewUrl = ResolveURIComponent.resolveBoundedImage(fileType, fileURI, 100, 100); String downloadUrl = ResolveURIComponent.resolve(fileType, fileURI, true);
This viewUrl can not work for file that is not image
For example, in forms, the viewUrl of a PDF is
http://localhost:8080/cms/intranet/_object/ametys-internal%253Asites/intranet/ametys-internal%253Aplugins/formsdirectory/ametys%253Aforms/Demandes/Demande%20travaux%20reprographie/ametys-internal%253Aform-entries/entry-1/_attribute/fichier/Travail%20collaboratif%20avec%20Ametys_max100x100.pdf?contentVersion=&objectId=form-entry://77f3c49e-9e9b-45ee-9e2c-c461ba48120f
which leads to a 404
I think the uri is simply ResolveURIComponent.resolveBoundedImage(fileType, fileURI, but what but what are the impacts on the illustration thumbnail in the online editor? All use of "viewUrl" should be checked