com.hn.upload.UploadPlatform Maven / Gradle / Ivy
package com.hn.upload;
public enum UploadPlatform {
/** 阿里云 */
Ali {
@Override
public FileUpload create(String scene) {
return new AliUpload(scene);
}
},
/** 七牛云 */
QI_NIU {
@Override
public FileUpload create(String scene) {
return new QiNiuUpload(scene);
}
},
/** 腾讯云 */
Tencent {
@Override
public FileUpload create(String scene) {
return new TencentUpload(scene);
}
},
/** Minio */
Minio {
@Override
public FileUpload create(String scene) {
return new MinioUpload(scene);
}
},
/** 本地 */
LOCAL {
@Override
public FileUpload create(String scene) {
return new LocalUpload(scene);
}
};
/**
* 根据场景创建对象
* @param scene 场景
* @return FileUpload {@link FileUpload}
*/
protected abstract FileUpload create(String scene);
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy