处理后台新需求
This commit is contained in:
+12
@@ -147,6 +147,18 @@ public class OssStorageService {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads a managed result object from either its object key or stored public URL.
|
||||
* This overload keeps callers from depending on the configured bucket name.
|
||||
*/
|
||||
public byte[] readObjectBytes(String value) {
|
||||
StorageLocation location = resolveStorageLocation(value);
|
||||
if (location == null) {
|
||||
throw new IllegalArgumentException("object value must not be blank");
|
||||
}
|
||||
return readObjectBytes(location.bucket(), location.objectKey());
|
||||
}
|
||||
|
||||
public boolean objectExists(String bucket, String objectKey) {
|
||||
String normalizedBucket = requireStorageName(bucket, "bucket");
|
||||
String normalizedObjectKey = requireStorageName(objectKey, "objectKey");
|
||||
|
||||
Reference in New Issue
Block a user