fix dict download
This commit is contained in:
parent
9e052b2fa1
commit
b6909eb7bd
4 changed files with 4 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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">
|
||||
|
|
Loading…
Add table
Reference in a new issue