From 73bee4fbe3428438fb55696e5f7644ff382919ca Mon Sep 17 00:00:00 2001 From: ArenMg Date: Sun, 23 May 2021 01:46:01 +0300 Subject: [PATCH] resolve debate export problem --- src/main/java/fr/lirmm/aren/ws/rest/DebateRESTFacade.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/fr/lirmm/aren/ws/rest/DebateRESTFacade.java b/src/main/java/fr/lirmm/aren/ws/rest/DebateRESTFacade.java index 04d0987..179447d 100644 --- a/src/main/java/fr/lirmm/aren/ws/rest/DebateRESTFacade.java +++ b/src/main/java/fr/lirmm/aren/ws/rest/DebateRESTFacade.java @@ -492,7 +492,8 @@ public class DebateRESTFacade extends AbstractRESTFacade { public Response export(@PathParam("id") Long id) throws Exception { Debate debate = debateService.findByUser(id, getUser(), true, true, false, false, false); File export = odfService.parseDebate(debate); - String fileName = debate.getDocument().getName().replaceAll("[^a-zA-Z0-9\\s]", "") + ".odt"; + // String fileName = debate.getDocument().getName().replaceAll("[^a-zA-Z0-9\\s]", "") + ".odt"; + String fileName = "aren_export_" + System.currentTimeMillis() + ".odt"; return Response.ok(export) .header("Content-disposition", "attachment; filename=\"" + fileName + "\"") .header("Content-length", export.length())