Compare commits
8 commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
4f82cdfa51 | ||
![]() |
935260c708 | ||
![]() |
dbcafff7fa | ||
![]() |
920333178f | ||
![]() |
c4521d91f6 | ||
![]() |
765c97644d | ||
![]() |
d92ec45368 | ||
![]() |
5fbac08b1a |
3 changed files with 14 additions and 5 deletions
4
pom.xml
4
pom.xml
|
@ -3,7 +3,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.codelibs.fess</groupId>
|
||||
<artifactId>fess</artifactId>
|
||||
<version>13.11.2-SNAPSHOT</version>
|
||||
<version>13.11.4-SNAPSHOT</version>
|
||||
<packaging>war</packaging>
|
||||
<name>Fess</name>
|
||||
<description>Fess is Full tExt Search System.</description>
|
||||
|
@ -54,7 +54,7 @@
|
|||
<okhttp.version>3.14.9</okhttp.version>
|
||||
|
||||
<!-- Crawler -->
|
||||
<crawler.version>3.11.1</crawler.version>
|
||||
<crawler.version>3.11.2</crawler.version>
|
||||
|
||||
<!-- Suggest -->
|
||||
<suggest.version>7.11.0</suggest.version>
|
||||
|
|
|
@ -336,7 +336,7 @@ public class AdminBackupAction extends FessAdminAction {
|
|||
try (final BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(out.stream(), Constants.CHARSET_UTF_8))) {
|
||||
SearchEngineUtil.scroll(index, hit -> {
|
||||
try {
|
||||
writer.write("{\"index\":{\"_index\":\"" + index + "\",\"_id\":\""
|
||||
writer.write("{\"index\":{\"_index\":\"" + hit.getIndex() + "\",\"_id\":\""
|
||||
+ StringEscapeUtils.escapeJson(hit.getId()) + "\"}}\n");
|
||||
writer.write(hit.getSourceAsString());
|
||||
writer.write("\n");
|
||||
|
|
|
@ -39,6 +39,7 @@ import org.dbflute.optional.OptionalThing;
|
|||
import org.lastaflute.web.Execute;
|
||||
import org.lastaflute.web.response.ActionResponse;
|
||||
import org.lastaflute.web.response.HtmlResponse;
|
||||
import org.lastaflute.web.response.StreamResponse;
|
||||
import org.lastaflute.web.ruts.multipart.MultipartFormFile;
|
||||
import org.lastaflute.web.ruts.process.ActionRuntime;
|
||||
import org.lastaflute.web.servlet.request.stream.WrittenStreamOut;
|
||||
|
@ -121,7 +122,15 @@ public class AdminStorageAction extends FessAdminAction {
|
|||
if (StringUtil.isEmpty(values[1])) {
|
||||
throwValidationError(messages -> messages.addErrorsStorageFileNotFound(GLOBAL), () -> asListHtml(encodeId(values[0])));
|
||||
}
|
||||
return asStream(values[1]).contentTypeOctetStream().stream(out -> {
|
||||
final StreamResponse response = new StreamResponse(StringUtil.EMPTY);
|
||||
final String name = values[1];
|
||||
final String encodedName = URLEncoder.encode(name, Constants.UTF_8_CHARSET).replace("+", "%20");
|
||||
response.header("Content-Disposition", "attachment; filename=\"" + name + "\"; filename*=utf-8''" + encodedName);
|
||||
response.header("Pragma", "no-cache");
|
||||
response.header("Cache-Control", "no-cache");
|
||||
response.header("Expires", "Thu, 01 Dec 1994 16:00:00 GMT");
|
||||
response.contentTypeOctetStream();
|
||||
return response.stream(out -> {
|
||||
try {
|
||||
downloadObject(getObjectName(values[0], values[1]), out);
|
||||
} catch (final StorageException e) {
|
||||
|
@ -259,7 +268,7 @@ public class AdminStorageAction extends FessAdminAction {
|
|||
if (values.length == 0) {
|
||||
return StringUtil.EMPTY;
|
||||
}
|
||||
return values[values.length - 1];
|
||||
return urlDecode(values[values.length - 1]);
|
||||
}
|
||||
|
||||
public static String decodePath(final String id) {
|
||||
|
|
Loading…
Add table
Reference in a new issue