|
@@ -29,6 +29,7 @@ final backupServiceProvider = Provider(
|
|
|
);
|
|
|
|
|
|
class BackupService {
|
|
|
+ final httpClient = http.Client();
|
|
|
final ApiService _apiService;
|
|
|
|
|
|
BackupService(this._apiService);
|
|
@@ -282,7 +283,8 @@ class BackupService {
|
|
|
),
|
|
|
);
|
|
|
|
|
|
- var response = await req.send(cancellationToken: cancelToken);
|
|
|
+ var response =
|
|
|
+ await httpClient.send(req, cancellationToken: cancelToken);
|
|
|
|
|
|
if (response.statusCode == 200) {
|
|
|
// asset is a duplicate (already exists on the server)
|
|
@@ -334,7 +336,6 @@ class BackupService {
|
|
|
|
|
|
Future<MultipartFile?> _getLivePhotoFile(AssetEntity entity) async {
|
|
|
var motionFilePath = await entity.getMediaUrl();
|
|
|
- // var motionFilePath = '/var/mobile/Media/DCIM/103APPLE/IMG_3371.MOV'
|
|
|
|
|
|
if (motionFilePath != null) {
|
|
|
var validPath = motionFilePath.replaceAll('file://', '');
|