mirror of https://github.com/halo-dev/halo
style: Change AttachmentType enum.
parent
ee6e5d52be
commit
537d28ba1c
|
@ -127,6 +127,6 @@ public class AliOssFileHandler implements FileHandler {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean supportType(AttachmentType type) {
|
public boolean supportType(AttachmentType type) {
|
||||||
return AttachmentType.ALIYUN.equals(type);
|
return AttachmentType.ALIOSS.equals(type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -129,6 +129,6 @@ public class BaiduBosFileHandler implements FileHandler {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean supportType(AttachmentType type) {
|
public boolean supportType(AttachmentType type) {
|
||||||
return AttachmentType.BAIDUYUN.equals(type);
|
return AttachmentType.BAIDUBOS.equals(type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -155,6 +155,6 @@ public class QiniuOssFileHandler implements FileHandler {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean supportType(AttachmentType type) {
|
public boolean supportType(AttachmentType type) {
|
||||||
return AttachmentType.QNYUN.equals(type);
|
return AttachmentType.QINIUOSS.equals(type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -142,6 +142,6 @@ public class TencentCosFileHandler implements FileHandler {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean supportType(AttachmentType type) {
|
public boolean supportType(AttachmentType type) {
|
||||||
return AttachmentType.TENCENTYUN.equals(type);
|
return AttachmentType.TENCENTCOS.equals(type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -125,6 +125,6 @@ public class UpOssFileHandler implements FileHandler {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean supportType(AttachmentType type) {
|
public boolean supportType(AttachmentType type) {
|
||||||
return AttachmentType.UPYUN.equals(type);
|
return AttachmentType.UPOSS.equals(type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -624,9 +624,9 @@ public class OldVersionMigrateHandler implements MigrateHandler {
|
||||||
// Set location
|
// Set location
|
||||||
String attachLocation = attachmentMap.getOrDefault("attachLocation", "").toString();
|
String attachLocation = attachmentMap.getOrDefault("attachLocation", "").toString();
|
||||||
if (StringUtils.equalsIgnoreCase(attachLocation, "qiniu")) {
|
if (StringUtils.equalsIgnoreCase(attachLocation, "qiniu")) {
|
||||||
attachment.setType(AttachmentType.QNYUN);
|
attachment.setType(AttachmentType.QINIUOSS);
|
||||||
} else if (StringUtils.equalsIgnoreCase(attachLocation, "upyun")) {
|
} else if (StringUtils.equalsIgnoreCase(attachLocation, "upyun")) {
|
||||||
attachment.setType(AttachmentType.UPYUN);
|
attachment.setType(AttachmentType.UPOSS);
|
||||||
} else {
|
} else {
|
||||||
attachment.setType(AttachmentType.LOCAL);
|
attachment.setType(AttachmentType.LOCAL);
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,12 +16,12 @@ public enum AttachmentType implements ValueEnum<Integer> {
|
||||||
/**
|
/**
|
||||||
* 又拍云
|
* 又拍云
|
||||||
*/
|
*/
|
||||||
UPYUN(1),
|
UPOSS(1),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 七牛云
|
* 七牛云
|
||||||
*/
|
*/
|
||||||
QNYUN(2),
|
QINIUOSS(2),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* sm.ms
|
* sm.ms
|
||||||
|
@ -31,17 +31,17 @@ public enum AttachmentType implements ValueEnum<Integer> {
|
||||||
/**
|
/**
|
||||||
* 阿里云
|
* 阿里云
|
||||||
*/
|
*/
|
||||||
ALIYUN(4),
|
ALIOSS(4),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 百度云
|
* 百度云
|
||||||
*/
|
*/
|
||||||
BAIDUYUN(5),
|
BAIDUBOS(5),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 腾讯云
|
* 腾讯云
|
||||||
*/
|
*/
|
||||||
TENCENTYUN(6);
|
TENCENTCOS(6);
|
||||||
|
|
||||||
private Integer value;
|
private Integer value;
|
||||||
|
|
||||||
|
|
|
@ -634,9 +634,9 @@ public class RecoveryServiceImpl implements RecoveryService {
|
||||||
// Set location
|
// Set location
|
||||||
String attachLocation = attachmentMap.getOrDefault("attachLocation", "").toString();
|
String attachLocation = attachmentMap.getOrDefault("attachLocation", "").toString();
|
||||||
if (StringUtils.equalsIgnoreCase(attachLocation, "qiniu")) {
|
if (StringUtils.equalsIgnoreCase(attachLocation, "qiniu")) {
|
||||||
attachment.setType(AttachmentType.QNYUN);
|
attachment.setType(AttachmentType.QINIUOSS);
|
||||||
} else if (StringUtils.equalsIgnoreCase(attachLocation, "upyun")) {
|
} else if (StringUtils.equalsIgnoreCase(attachLocation, "upyun")) {
|
||||||
attachment.setType(AttachmentType.UPYUN);
|
attachment.setType(AttachmentType.UPOSS);
|
||||||
} else {
|
} else {
|
||||||
attachment.setType(AttachmentType.LOCAL);
|
attachment.setType(AttachmentType.LOCAL);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue