@Service public class OssPersistenceServiceImpl extends Object implements OssPersistenceService
构造器和说明 |
---|
OssPersistenceServiceImpl() |
限定符和类型 | 方法和说明 |
---|---|
boolean |
deleteFile(String bucketName,
String remotePath)
删除文件
|
boolean |
downloadFile(String bucketName,
String remotePath,
String localPath)
下载文件
|
String |
statFile(String bucketName,
String remotePath)
获取文件属性
|
String |
storeFile(String bucketName,
String localPath,
String remotePath)
存储文件
|
public String storeFile(String bucketName, String localPath, String remotePath)
OssPersistenceService
storeFile
在接口中 OssPersistenceService
bucketName
- 桶名称
腾讯云不支持检查桶是否存在以及主动创建桶的方法,在使用时一定要检查在云对象里面是否提前创建好桶了localPath
- 本地文件路径remotePath
- 远程文件地址public boolean downloadFile(String bucketName, String remotePath, String localPath)
OssPersistenceService
downloadFile
在接口中 OssPersistenceService
bucketName
- 桶名称remotePath
- 远程文件地址localPath
- 本地文件路径public String statFile(String bucketName, String remotePath)
OssPersistenceService
statFile
在接口中 OssPersistenceService
bucketName
- 桶名称remotePath
- 远程文件地址public boolean deleteFile(String bucketName, String remotePath)
OssPersistenceService
deleteFile
在接口中 OssPersistenceService
bucketName
- 桶名称remotePath
- 远程文件地址