pull/983/head
Ryan Wang 2020-07-19 22:04:43 +08:00 committed by GitHub
parent 23789b7acd
commit 69018e85d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 5 deletions

View File

@ -68,7 +68,7 @@ public class HaloConfiguration {
break; break;
} }
log.info("halo cache store load impl : [{}]", stringCacheStore.getClass()); log.info("Halo cache store load impl : [{}]", stringCacheStore.getClass());
return stringCacheStore; return stringCacheStore;
} }

View File

@ -32,7 +32,8 @@ import java.nio.file.Paths;
import java.util.Objects; import java.util.Objects;
import static run.halo.app.handler.file.FileHandler.isImageType; import static run.halo.app.handler.file.FileHandler.isImageType;
import static run.halo.app.model.support.HaloConst.URL_SEPARATOR; import static run.halo.app.model.support.HaloConst.*;
import static run.halo.app.utils.HaloUtils.ensureSuffix;
/** /**
* Qiniu oss file handler. * Qiniu oss file handler.
@ -78,7 +79,7 @@ public class QiniuOssFileHandler implements FileHandler {
String uploadToken = auth.uploadToken(bucket, null, 60 * 60, putPolicy); String uploadToken = auth.uploadToken(bucket, null, 60 * 60, putPolicy);
// Create temp path // Create temp path
Path tmpPath = Paths.get(System.getProperty("java.io.tmpdir"), bucket); Path tmpPath = Paths.get(ensureSuffix(TEMP_DIR, FILE_SEPARATOR), bucket);
StringBuilder basePath = new StringBuilder(protocol) StringBuilder basePath = new StringBuilder(protocol)
.append(domain) .append(domain)

View File

@ -23,7 +23,7 @@ public class HaloConst {
/** /**
* Temporary directory. * Temporary directory.
*/ */
public final static String TEMP_DIR = System.getProperties().getProperty("java.io.tmpdir"); public final static String TEMP_DIR = "/tmp/run.halo.app";
public final static String PROTOCOL_HTTPS = "https://"; public final static String PROTOCOL_HTTPS = "https://";

View File

@ -37,7 +37,7 @@ spring:
multipart: multipart:
max-file-size: 10240MB max-file-size: 10240MB
max-request-size: 10240MB max-request-size: 10240MB
location: ${java.io.tmpdir} location: /tmp/run.halo.app
management: management:
endpoints: endpoints:
web: web: