mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 15:24:35 +01:00
fix: icloud upload (#267)
This commit is contained in:
@@ -71,6 +71,7 @@ abstract final class ICloud {
|
|||||||
String? localPath,
|
String? localPath,
|
||||||
}) async {
|
}) async {
|
||||||
final completer = Completer<ICloudErr?>();
|
final completer = Completer<ICloudErr?>();
|
||||||
|
try {
|
||||||
await ICloudStorage.download(
|
await ICloudStorage.download(
|
||||||
containerId: _containerId,
|
containerId: _containerId,
|
||||||
relativePath: relativePath,
|
relativePath: relativePath,
|
||||||
@@ -85,6 +86,10 @@ abstract final class ICloud {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
} catch (e, s) {
|
||||||
|
_logger.warning('Download $relativePath failed', e, s);
|
||||||
|
completer.complete(ICloudErr(type: ICloudErrType.generic, message: '$e'));
|
||||||
|
}
|
||||||
return completer.future;
|
return completer.future;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user