High performance self-hosted photo and video management solution.
TypeScript backup-toolfluttergoogle-photosgoogle-photos-alternativejavascriptmobile-appnestjsnodejsphoto-galleryphotosphotos-managementself-hostedsveltesveltekittypescriptvideos
fix(mobile): Revert - upload motion and live part of LivePhotos together (#5601)
Alex64e985d60095
diff --git a/mobile/lib/modules/backup/services/backup.service.dart b/mobile/lib/modules/backup/services/backup.service.dartindex 6894a8aef8..50dd85d00f 100644--- a/mobile/lib/modules/backup/services/backup.service.dart+++ b/mobile/lib/modules/backup/services/backup.service.dart@@ -310,6 +310,13 @@ class BackupService {req.files.add(assetRawUploadData);+ if (entity.isLivePhoto) {+ var livePhotoRawUploadData = await _getLivePhotoFile(entity);+ if (livePhotoRawUploadData != null) {+ req.files.add(livePhotoRawUploadData);+ }+ }+setCurrentUploadAssetCb(CurrentUploadAsset(id: entity.id,@@ -325,29 +332,6 @@ class BackupService {var response =await httpClient.send(req, cancellationToken: cancelToken);- // Send live photo separately- if (entity.isLivePhoto) {- var livePhotoRawUploadData = await _getLivePhotoFile(entity);- if (livePhotoRawUploadData != null) {- var livePhotoReq = MultipartRequest(- req.method,- req.url,- onProgress: req.onProgress,- )- ..headers.addAll(req.headers)- ..fields.addAll(req.fields);-- livePhotoReq.files.add(livePhotoRawUploadData);- // Send live photo only if the non-motion part is successful- if (response.statusCode == 200 || response.statusCode == 201) {- response = await httpClient.send(- livePhotoReq,- cancellationToken: cancelToken,- );- }- }- }-if (response.statusCode == 200) {// asset is a duplicate (already exists on the server)duplicatedAssetIds.add(entity.id);@@ -405,7 +389,7 @@ class BackupService {var fileStream = motionFile.openRead();String fileName = p.basename(motionFile.path);return http.MultipartFile(- "assetData",+ "livePhotoData",fileStream,motionFile.lengthSync(),filename: fileName,