Fixed issue with video upload timeout and upper case file type on ios
This commit is contained in:
parent
69ed287974
commit
ca0feb8c8d
4 changed files with 24 additions and 9 deletions
|
@ -17,6 +17,10 @@ PODS:
|
|||
- Flutter
|
||||
- FMDB (>= 2.7.5)
|
||||
- Toast (4.0.0)
|
||||
- video_player_avfoundation (0.0.1):
|
||||
- Flutter
|
||||
- wakelock (0.0.1):
|
||||
- Flutter
|
||||
|
||||
DEPENDENCIES:
|
||||
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
|
||||
|
@ -25,6 +29,8 @@ DEPENDENCIES:
|
|||
- path_provider_ios (from `.symlinks/plugins/path_provider_ios/ios`)
|
||||
- photo_manager (from `.symlinks/plugins/photo_manager/ios`)
|
||||
- sqflite (from `.symlinks/plugins/sqflite/ios`)
|
||||
- video_player_avfoundation (from `.symlinks/plugins/video_player_avfoundation/ios`)
|
||||
- wakelock (from `.symlinks/plugins/wakelock/ios`)
|
||||
|
||||
SPEC REPOS:
|
||||
trunk:
|
||||
|
@ -44,6 +50,10 @@ EXTERNAL SOURCES:
|
|||
:path: ".symlinks/plugins/photo_manager/ios"
|
||||
sqflite:
|
||||
:path: ".symlinks/plugins/sqflite/ios"
|
||||
video_player_avfoundation:
|
||||
:path: ".symlinks/plugins/video_player_avfoundation/ios"
|
||||
wakelock:
|
||||
:path: ".symlinks/plugins/wakelock/ios"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
device_info_plus: e5c5da33f982a436e103237c0c85f9031142abed
|
||||
|
@ -54,6 +64,8 @@ SPEC CHECKSUMS:
|
|||
photo_manager: 84fa94fbeb82e607333ea9a13c43b58e0903a463
|
||||
sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904
|
||||
Toast: 91b396c56ee72a5790816f40d3a94dd357abc196
|
||||
video_player_avfoundation: e489aac24ef5cf7af82702979ed16f2a5ef84cff
|
||||
wakelock: d0fc7c864128eac40eba1617cb5264d9c940b46f
|
||||
|
||||
PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c
|
||||
|
||||
|
|
|
@ -101,13 +101,9 @@ class ImmichSliverAppBar extends ConsumerWidget {
|
|||
),
|
||||
],
|
||||
systemOverlayStyle: const SystemUiOverlayStyle(
|
||||
// Status bar color
|
||||
statusBarColor: Colors.indigo,
|
||||
|
||||
// Status bar brightness (optional)
|
||||
statusBarIconBrightness: Brightness.light, // For Android (dark icons)
|
||||
statusBarBrightness: Brightness.dark,
|
||||
),
|
||||
statusBarColor: Colors.white,
|
||||
statusBarBrightness: Brightness.dark,
|
||||
statusBarIconBrightness: Brightness.light),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
|
||||
|
@ -35,7 +36,11 @@ class BackupService {
|
|||
|
||||
for (var entity in assetList) {
|
||||
try {
|
||||
file = await entity.file.timeout(const Duration(seconds: 5));
|
||||
if (entity.type == AssetType.video) {
|
||||
file = await entity.file;
|
||||
} else {
|
||||
file = await entity.file.timeout(const Duration(seconds: 5));
|
||||
}
|
||||
|
||||
if (file != null) {
|
||||
// reading exif
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:path/path.dart' as p;
|
||||
|
||||
class FileHelper {
|
||||
static getMimeType(String filePath) {
|
||||
debugPrint(filePath);
|
||||
var fileExtension = p.extension(filePath).split(".")[1];
|
||||
|
||||
switch (fileExtension) {
|
||||
switch (fileExtension.toLowerCase()) {
|
||||
case 'gif':
|
||||
return {"type": "image", "subType": "gif"};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue