Browse Source

fix dict download

Kaoru FUZITA 9 years ago
parent
commit
b6909eb7bd

+ 1 - 1
src/main/java/org/codelibs/fess/app/web/admin/dict/kuromoji/AdminDictKuromojiAction.java

@@ -207,7 +207,7 @@ public class AdminDictKuromojiAction extends FessAdminAction {
     public ActionResponse download(final DownloadForm form) {
         validate(form, messages -> {}, () -> downloadpage(form.dictId));
         return kuromojiService.getKuromojiFile(form.dictId).map(file -> {
-            return asStream(new File(file.getPath()).getName()).contentType("text/plain; charset=UTF-8").stream(out -> {
+            return asStream(new File(file.getPath()).getName()).stream(out -> {
                 try (InputStream inputStream = file.getInputStream()) {
                     out.write(inputStream);
                 }

+ 1 - 1
src/main/java/org/codelibs/fess/app/web/admin/dict/synonym/AdminDictSynonymAction.java

@@ -238,7 +238,7 @@ public class AdminDictSynonymAction extends FessAdminAction {
     public ActionResponse download(final DownloadForm form) {
         validate(form, messages -> {}, () -> downloadpage(form.dictId));
         return synonymService.getSynonymFile(form.dictId).map(file -> {
-            return asStream(new File(file.getPath()).getName()).contentType("text/plain; charset=UTF-8").stream(out -> {
+            return asStream(new File(file.getPath()).getName()).stream(out -> {
                 try (InputStream inputStream = file.getInputStream()) {
                     out.write(inputStream);
                 }

+ 1 - 1
src/main/webapp/WEB-INF/view/admin/dict/kuromoji/download.jsp

@@ -72,7 +72,7 @@
 									</la:info>
 									<la:errors />
 								</div>
-								<la:form target="_blank">
+								<la:form>
 									<div>
 										<la:hidden property="dictId" />
 										<table class="table table-bordered table-striped">

+ 1 - 1
src/main/webapp/WEB-INF/view/admin/dict/synonym/download.jsp

@@ -72,7 +72,7 @@
 									</la:info>
 									<la:errors />
 								</div>
-								<la:form target="_blank">
+								<la:form>
 									<div>
 										<la:hidden property="dictId" />
 										<table class="table table-bordered table-striped">