Skip to content

Commit

Permalink
fix: video file not detected
Browse files Browse the repository at this point in the history
  • Loading branch information
shenlong-tanwen committed Dec 11, 2023
1 parent 57b2638 commit 70c4c38
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions mobile/lib/modules/backup/services/backup.service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import 'package:openapi/api.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:photo_manager/photo_manager.dart';
import 'package:cancellation_token_http/http.dart' as http;
import 'package:path/path.dart' as p;

final backupServiceProvider = Provider(
(ref) => BackupService(
Expand Down Expand Up @@ -336,9 +337,12 @@ class BackupService {
// Send live photo separately
if (entity.isLivePhoto) {
if (livePhotoFile != null) {
final livePhotoTitle = await entity.titleAsyncWithSubtype;
var fileStream = livePhotoFile.openRead();
var livePhotoRawUploadData = http.MultipartFile(
final livePhotoTitle = p.setExtension(
originalFileName,
p.extension(livePhotoFile.path),
);
final fileStream = livePhotoFile.openRead();
final livePhotoRawUploadData = http.MultipartFile(
"assetData",
fileStream,
livePhotoFile.lengthSync(),
Expand Down

0 comments on commit 70c4c38

Please sign in to comment.