mirror of https://github.com/halo-dev/halo
代码优化
parent
48528fd169
commit
7fad38ebec
|
@ -53,7 +53,7 @@ public class AliYunFileHandler implements FileHandler {
|
|||
try {
|
||||
String basename = FilenameUtils.getBasename(file.getOriginalFilename());
|
||||
String extension = FilenameUtils.getExtension(file.getOriginalFilename());
|
||||
String timestamp = String.valueOf(new Date().getTime());
|
||||
String timestamp = String.valueOf(System.currentTimeMillis());
|
||||
String upFilePath = StringUtils.join(basename, "_", timestamp, ".", extension);
|
||||
String filePath = StringUtils.join(StringUtils.appendIfMissing(ossSource, "/"), upFilePath);
|
||||
|
||||
|
|
|
@ -6,9 +6,25 @@ package run.halo.app.model.properties;
|
|||
* @date 2019-04-04 00:00:56
|
||||
*/
|
||||
public enum AliYunProperties implements PropertyEnum {
|
||||
|
||||
/**
|
||||
* Aliyun oss endpoint.
|
||||
*/
|
||||
OSS_ENDPOINT("oss_aliyun_endpoint", String.class),
|
||||
|
||||
/**
|
||||
* Aliyun oss bucket name.
|
||||
*/
|
||||
OSS_BUCKET_NAME("oss_aliyun_bucket_name", String.class),
|
||||
|
||||
/**
|
||||
* Aliyun oss access key.
|
||||
*/
|
||||
OSS_ACCESS_KEY("oss_aliyun_access_key", String.class),
|
||||
|
||||
/**
|
||||
* Aliyun oss access secret.
|
||||
*/
|
||||
OSS_ACCESS_SECRET("oss_aliyun_access_secret", String.class);
|
||||
|
||||
private String value;
|
||||
|
|
|
@ -6,12 +6,6 @@ package run.halo.app.model.properties;
|
|||
*/
|
||||
public enum BlogProperties implements PropertyEnum {
|
||||
|
||||
|
||||
/**
|
||||
* Blog locale.
|
||||
*/
|
||||
BLOG_LOCALE("blog_locale", String.class),
|
||||
|
||||
/**
|
||||
* Blog title.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue