public class AliyunossProvider extends AbstractProvider
| Modifier and Type | Field and Description |
|---|---|
static String |
NAME |
prefix| Constructor and Description |
|---|
AliyunossProvider(String urlprefix,
String endpoint,
String bucketName,
String accessKey,
String secretKey,
boolean isPrivate) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
Map<String,Object> |
createUploadToken(UploadToken param)
删除图片
|
boolean |
delete(String fileKey)
删除图片
|
String |
getUrl(String fileKey)
获取文件下载地址
|
String |
name() |
String |
upload(UploadObject object)
文件上传
|
downloadAndSaveAs, downloadFile, getFullPathpublic static final String NAME
public String upload(UploadObject object)
StorageProviderobject - 对象public Map<String,Object> createUploadToken(UploadToken param)
StorageProviderparam - tokenpublic boolean delete(String fileKey)
StorageProviderfileKey - 文件keypublic String getUrl(String fileKey)
StorageProviderfileKey - 文件(全路径或者fileKey)public void close()
throws IOException
IOExceptionpublic String name()
Copyright © 2019. All rights reserved.