Open berndmoos opened 10 months ago
I'll start by overriding the method createKWICDownloadFile() in DGD2QuerySerializer and then copy the code from DefaultQuerySerializer there. Then I should be free to change the code in DefaultQuerySerializer (or so I think...)
Afaik, there is nothing open here, but I am not sure if I should close the issue...
I will test this in the AGDZuMultBackend and close this issue if everything works.
@EleFri : What is the
target
good for in...Lines 402ff in DefaultQuerySerializer:
The method is called from
createKWICDownloadFile(...)
elsewhere in the same class. It is not working for me because the path for the tempFile calculated in this way does not exist in my setup. If the purpose is to place the file directly into the download directory, I think this is wrong. The backend should not have to know about the (server) context in which the file sits.I think it would be better to just create an "ordinary" temp file here (i.e. in the default temp folder of the system) and to make that available via the download folder once a server context is known. The download directory can then be determined like so:
File downloadDirectory = new File(getServletContext().getRealPath("/downloads/"));