I am trying to find a way to show attached documents in the DocuView form, but the problem is that the documents are saved in blob storage as compressed files. (This has been done because most of the documents the customer has are XML files, and since they can be compressed quite a lot, it seemed like a good idea to save on storage space.)
So when they are showed on the form they look like this.

So I need to find a way to uncompress the data before its shown in the form.
I have been looking into the code that is run when a record with an attached document is shown in the form, but I have only so far been able to find this.
In this method, DocumentManagement.getDisplayUrl it seems that the URL of the blob storage file is found.
This method is being called from DocumentViewer.createDocument, where the document information is then saved in viewerDocument’s(Class DocumentViewerDocument) parm methods.
And then the saved url is used in the DocuViewerContainer control on the Form DocuView.
So my problem now is I do not know how to change what is shown in that Control?
Do I need to receive the file from the URL, uncompress is and save it again as a temp file in the blob storage, and pass the new URL to the control? And then remove the file when the control is done using it? (Witch seems like a bad solution, since it would take extra time, and there is a chance that the temp file well not be deleted and left behind.)
Or is it somehow possible to change the content of the file before its shown in the control on the form?