合并日志 新增自定义文件路径
This commit is contained in:
@@ -24,6 +24,7 @@ class StorageConfig {
|
||||
final String host;
|
||||
final int port;
|
||||
final bool ssl;
|
||||
final String? path;
|
||||
final String accessKey;
|
||||
final String secretKey;
|
||||
|
||||
@@ -31,6 +32,7 @@ class StorageConfig {
|
||||
{required this.host,
|
||||
required this.port,
|
||||
this.ssl = false,
|
||||
this.path,
|
||||
required this.accessKey,
|
||||
required this.secretKey});
|
||||
}
|
||||
|
||||
@@ -49,6 +49,6 @@ class MinioStorage implements Storage {
|
||||
Future<String> uploadObject(
|
||||
String bucketName, String objectName, Uint8List data) async {
|
||||
await _minio.putObject(bucketName, objectName, Stream.fromIterable([data]));
|
||||
return "http${_config.ssl ? "s" : ""}://${_config.host}:${_config.port}/$bucketName/$objectName";
|
||||
return "${_config.path ?? 'http${_config.ssl ? "s" : ""}://${_config.host}:${_config.port}'}/$bucketName/$objectName";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user