mirror of
https://github.com/ArenMg/aren.git
synced 2024-11-24 09:28:03 +00:00
resolve debate export problem
This commit is contained in:
parent
eba6a08a96
commit
73bee4fbe3
1 changed files with 2 additions and 1 deletions
|
@ -492,7 +492,8 @@ public class DebateRESTFacade extends AbstractRESTFacade<Debate> {
|
|||
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())
|
||||
|
|
Loading…
Reference in a new issue